wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Tutorials > General Mapping Tutorials
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 06-05-2005, 04:03 AM   #1
linkmaster23
User
 
linkmaster23's Avatar
 
Join Date: Mar 2003
Posts: 1,452

Submissions (3)

linkmaster23 will become famous soon enough (30)linkmaster23 will become famous soon enough (30)

Default I don't like MULTIPLES of my HEROES! How do I fix it?

Boom! Here we go.

Now, let's say you're trying to make a new custom hero and want to add it to your Tavern / Altar, but you're having an issue. An issue that allows you to have 5 BILLION of the same hero! Double-yoo tee eff?

Well, YOU ARE NOT ALONE! (At least, for now.)

OK. Now, let's fix this.

First thing you need to do.

On the main Editor Menu, go to the Advanced tab. Go down to Gameplay Constants. Next, check the box at the top stating "Use custom gameplay constants". Now you can edit all this junk you see below.

Now, select any one of the constants and hit "T" TWO times on your keyboard. You should now be on the Techtree - Dependency Equivalents - Hero constant. Double-click on this constant.

Wow! When the hell did this get here? Turns out, Blizzard snuck this little bugger in a few patches ago. So now... just click Add Unit. Find your custom hero, and hit OK.

Now, cool. You have to have a Altar in order to buy this hero, and you can't buy anymore till you Tier up.

Now exactly how did this do that?

Well, you know that Techtree Requirements section of the Unit in the Object Editor? Well, it actually makes use of that. One of the requirements of being a hero is to have some tier / level requirements.

-----

Techtree - Requirements == Any Altar
Techtree - Requirements - Tier 2 == Any Tier 2 Hall, Any Altar
Techtree - Requirements - Tier 3 == Any Tier 3 Hall, Any Altar

-----

If you have more than 3 tiers, this is where you edit it to have more than 3 heroes!

Now, at this point you can buy more than 1 of the Special Heroes still. Time to fix that too.

Load up the Trigger Editor. And copy this code exactly.

Trigger:
NoDoubleHero
Collapse Events
Map initialization
Conditions
Collapse Actions
Player - Limit training of SPECIALHERO1 to 1 for Player 1 (Red)
Player - Limit training of SPECIALHERO1 to 1 for Player 2 (Blue)
Player - Limit training of SPECIALHERO1 to 1 for Player ...
-------- --------
Player - Limit training of SPECIALHERO2 to 1 for Player 1 (Red)
Player - Limit training of SPECIALHERO2 to 1 for Player 2 (Blue)
Player - Limit training of SPECIALHERO2 to 1 for Player ...

Now, just add-on new heroes to this trigger and the Gameplay Constant and BOOM there ya go. No more flippin' multiple heroes!

-Linkmaster23
linkmaster23 is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 06-05-2005, 10:08 AM   #2
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

As far as NoDoubleHero trigger goes, you could optimize it considerably by using a loop (I know this thread is meant for begginers, but even they should learn to use loops):
Trigger:
NoDoubleHero
Collapse Events
Map initialization
Conditions
Collapse Actions
Collapse For each Integer A from 1 to 12 do actions
Collapse Loop - Actions
Player - Limit training of SPECIALHERO1 to 1 for Player (Integer A)
Player - Limit training of SPECIALHERO2 to 1 for Player (Integer A)
BTW, shouldn't this go into the submissions forum? Or perhaps just general development?
__________________
Anitarf is offline   Reply With Quote
Old 06-05-2005, 01:12 PM   #3
johnfn
Taur is... MY SISTER!!!


Respected User
 
Join Date: Jan 2004
Posts: 1,633

Submissions (3)

johnfn has a spectacular aura about (129)

Send a message via AIM to johnfn
Default

If you wanted to further optimize that loop, you could turn SPECLIAHERO into a unit array and loop through each one of those.

However, linkmaster said that this is mostly for noobs who don't understand much about loops/arrays. But I say if you wanna try it go ahead ;)

Quote:
Originally Posted by Anitarf
BTW, shouldn't this go into the submissions forum? Or perhaps just general development?

Or the FAQ top ten ... ;)
__________________
Zone Control. Give it a try!

Taur: btw dun tell anyone but I bribed the wc3c admins with a life supply of packaged peanuts to host UL ^^

Taur | Unsung Legends says:
guess what blade?
Blade.dk says:
JOHN IS YO BRO!


johnfn is offline   Reply With Quote
Old 06-05-2005, 02:44 PM   #4
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by johnfn
If you wanted to further optimize that loop, you could turn SPECLIAHERO into a unit array and loop through each one of those.
If you did that, you would still need to initialize the array first, so unless you looped through all the new hero types with some other triggers as well, doing this wouldn't spare you any work.
__________________
Anitarf is offline   Reply With Quote
Old 06-05-2005, 03:04 PM   #5
johnfn
Taur is... MY SISTER!!!


Respected User
 
Join Date: Jan 2004
Posts: 1,633

Submissions (3)

johnfn has a spectacular aura about (129)

Send a message via AIM to johnfn
Default

Not necessarily, you could always set it to unit types of a unit in a reigon, if you had them all in a certain area for show or something ;)
__________________
Zone Control. Give it a try!

Taur: btw dun tell anyone but I bribed the wc3c admins with a life supply of packaged peanuts to host UL ^^

Taur | Unsung Legends says:
guess what blade?
Blade.dk says:
JOHN IS YO BRO!


johnfn is offline   Reply With Quote
Old 06-05-2005, 07:19 PM   #6
linkmaster23
User
 
linkmaster23's Avatar
 
Join Date: Mar 2003
Posts: 1,452

Submissions (3)

linkmaster23 will become famous soon enough (30)linkmaster23 will become famous soon enough (30)

Default

Let's keep it simple guys.
linkmaster23 is offline   Reply With Quote
Old 06-08-2005, 11:27 PM   #7
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

I dunno.

For some people the loop would be simple = Less clicks.

Let's leave it with all the comments and let people choose it.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 06-22-2005, 11:04 PM   #8
linkmaster23
User
 
linkmaster23's Avatar
 
Join Date: Mar 2003
Posts: 1,452

Submissions (3)

linkmaster23 will become famous soon enough (30)linkmaster23 will become famous soon enough (30)

Default

Quote:
Originally Posted by Lord Vexorian
I dunno.

For some people the loop would be simple = Less clicks.

Let's leave it with all the comments and let people choose it.

Re-stickying for a few. I keep getting IMed about this.
linkmaster23 is offline   Reply With Quote
Old 06-22-2005, 11:07 PM   #9
linkmaster23
User
 
linkmaster23's Avatar
 
Join Date: Mar 2003
Posts: 1,452

Submissions (3)

linkmaster23 will become famous soon enough (30)linkmaster23 will become famous soon enough (30)

Default

Quote:
Originally Posted by linkmaster23
Re-stickying for a few. I keep getting IMed about this.

WHOA. Why is this in here, this goes in the Trigger Forum. Whoever moved it, this is for spells and stuff. This forums isn't even looked at anymore. Back to the main forum so I can stop getting IMed about this.
linkmaster23 is offline   Reply With Quote
Old 06-23-2005, 04:27 PM   #10
Panto
LASER DRAGONS IS RELEASED
 
Panto's Avatar


Development Moderator
User Project: Panto
 
Join Date: Mar 2003
Posts: 3,167

Submissions (2)

Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)

Approved Map: Call to Arms

Default

This should help to demonstrate the method.
__________________
Pantokrator Maps forum.
LASER DRAGONS RELEASED!.
"One good test is worth a thousand expert opinions." Wernher von Braun
"The perfect is the enemy of the good." Voltaire
"When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." C.S. Lewis
Panto is offline   Reply With Quote
Old 06-24-2005, 09:00 AM   #11
cr0magenen
 
Posts: n/a
Default

ummm....i cant seem to find the "game constants"....am i missing a patch or mod or is it only in frozen thorne....if someone could help id appreciate it, thanks

Last edited by cr0magenen : 06-24-2005 at 05:15 PM.
  Reply With Quote
Old 06-25-2005, 12:42 PM   #12
Keitaro
User
 
Join Date: Jun 2004
Posts: 45

Keitaro has little to show at this moment (0)

Default

I had that problem too, but then I went and downloaded the newest patch and then suddenly it was there in gameplay constants.

If you are somehow unable to do download it, there's an alternative method.

Click on any standard hero (human if your custom hero is humam, neutral if neutral and etc) and find the field that reads: dependancy equivalent list. Add your hero there and it will have the same dependancy equivalence as the standard hero you chose.
But if you summon one of your custom heroes first, the standard hero dissappears. There are ways around it, but the best way would be to get the newest patch.
Keitaro is offline   Reply With Quote
Old 07-14-2005, 01:45 AM   #13
sunlit56
 
Posts: n/a
Default

wouldnt it be simplier to go to triggers - melee - limit one type hero per player?
  Reply With Quote
Old 07-14-2005, 03:13 PM   #14
Panto
LASER DRAGONS IS RELEASED
 
Panto's Avatar


Development Moderator
User Project: Panto
 
Join Date: Mar 2003
Posts: 3,167

Submissions (2)

Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)Panto is a jewel in the rough (247)

Approved Map: Call to Arms

Default

Quote:
Originally Posted by sunlit56
wouldnt it be simplier to go to triggers - melee - limit one type hero per player?

Oh! He's so smart! Let's all do it his way! This whole thread has been for nothing, because that's all you have to do!
__________________
Pantokrator Maps forum.
LASER DRAGONS RELEASED!.
"One good test is worth a thousand expert opinions." Wernher von Braun
"The perfect is the enemy of the good." Voltaire
"When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." C.S. Lewis
Panto is offline   Reply With Quote
Old 08-06-2005, 12:45 AM   #15
aaaa
User
 
Join Date: Nov 2003
Posts: 8

aaaa has little to show at this moment (0)

Default

Quote:
Originally Posted by Panto
Quote:
Originally Posted by sunlit56
wouldnt it be simplier to go to triggers - melee - limit one type hero per player?

Oh! He's so smart! Let's all do it his way! This whole thread has been for nothing, because that's all you have to do!
Nope thats incorrect , see i did that with my map and it works ,execpt for one small but very bad bug. See if one of your hero dies it counts that you don't have that hero and you can pick a different hero. For example lets take archmage and bloodmage. If your archmage dies you can summon your bloodmage and not resummon your archmage , so if you had a map like (lets say) dota and you summoned a guy, while hes dead you could summon another guy (but the taverns fade away so ot doesn't happen in dota).

~Hellzfire74 (account lost cheak my thred called Lost Account and can't log in as Guest)
aaaa is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 05:59 AM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services