HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Having problems programming HEROS in CTF

08-07-2002, 02:07 AM#1
Guest
Hi all my name is eric and im hear to ask for some assistance. I just dived into the pool of programming maps for warcraft III and man is it fun... but Im having some trouble. Notice when you purchase a hero from an altar all the other heros go dark grey, and you cant select them? well on my new altar of darkness, they dont go grey. Basically instead of just purchasing one hero and thats all, you can now purchase 3 heros from this altar.
In addition to that, you can also purchase one more hero from a different altar, and then ALL the heros go grey. How do I make it so that when purchasing a hero from ANY altar, all the remaining heros are not for purchase? I have included a type of walkthrough of my problems, just a little visual for people that want to help. Please help me out, let me know what I need to do. Thank you.

P.S. xHCx Inferno is the original creator of this map. He gave me permission to edit this.
_______________________________

*First I click my altar of darkness...




*Then I purchase my first hero. Notice that as I am purchasing my first unit, the others are still available to be purchased.


*Heres a shot of me with 3 heros. This is the big problem, how unfair would that be?!!?



*Finally heres a screen showing you that you can purchase 1 more unit from another altar (4 heros in all) and the desired look of "non purchasable" heros is shown here ( the grey covered icons).

08-07-2002, 04:40 AM#2
Guest
people please help me out. all you people that take a look at this probbally know how to help me out. I really need help
08-07-2002, 08:37 PM#3
Guest
refresh please help me out here. want to finish my modified map
08-08-2002, 08:46 PM#4
Guest
I'm pretty sure I understand the problem... I don't know if there's a way around it though.

For any regular race who owns an altar you can only have one hero per level of townhall tech (town hall->1hero, keep->2heros, castle->3heros). If you take a look in the unit editor they have levels of requirements (check the hero units I think). ie the Human Paladin has a requirement of hkep and then hcas (I'm not at my computer so they may be slightly different). If you remove these requirements then you can get all of them without teching up. If you WANT your new hero units to have this same requirement (so that you can only have ONE when you are at your most basic tech level) then you'd have to add these requirements to the new heros as well. AFAIK you can only make three tech levels of heros (which is what WC3 uses in the campaigns) it doesn't look like you can do beyond this and add a 4th or 5th requirement beyond castle, or having something like hlum, hkep, hcas to get the 3rd, 4th and 5th hero.

Take a queue from the existing heros and check the nomenclature of their requirements. If you only want to have ONE hero trainable from any of the multiple altars that could be tougher...

I'd suggest just going with triggers, so as soon as the player begins training a hero (or their second hero, or what ever) you set a boolean flag or something to TRUE. Then if a new player command is issued and equals 'training unit' where 'training unit = hero' you would cancel that player's last order and print a game text message stating that the hero cap has been met.

Doesn't seem like there's any other options... think of when you build two blacksmiths, one can upgrade swords, and the other can upgrade armor, but the actions of one blacksmith doesn't affect the other. Same thing for a player with multiple altars I would think!

I hope this helps... and makes sense!! And if it turns out I'm wrong about any of these things by all means let me know! ;)

Nicodemus
08-08-2002, 10:16 PM#5
Guest
Well, I have seen 1 creative solution to this type of problem.

Edit the heroes so they take up more supply.

This one CTF map I've seen on B-net has it so you can only have 1 hero at any given time because all heroes cost 90 supply maxing it out after you make one.
08-08-2002, 10:28 PM#6
Guest
what the heck would the trigger look like to create that limit. I went through the editor on all the triggers and tried to create my own. I obviously dont know to much game programming. Is there a way I could get this trigger from you? It would be more than helpful, and you would get full credit for fixing this bug in my map. Hows that for a deal??? you give me a quick trigger and you name lives forever in a map! yea! really though, could you kick one up really quick. Let me know, also you can msg me on AIM: all4thenookie101 or you can email me at [email protected]. or you can just post here again. let me know and again thank you for your help!

-Eric :p
08-08-2002, 10:58 PM#7
Guest
Thanks Gamerdragon for your reply, I appreciate it. My brother was sitting right next to me when he suggested your idea to me. I figured it to be genius but, then I thought there has to be some sort of other way like changing the unit requirements and such. BTW, if nico reads this, please note that changing the "requirements" for building heros does not effectively change the problem. Hopefully that trigger will come through. If not, im going with the idea of changing supply amount. thanks again dragon!

-Eric
08-09-2002, 05:50 PM#8
Guest
Alright, well that's good to know that the build requirements wouldn't solve that type of issue.
As for the trigger, it's easier to just go into the unit editor and change the amount of supply used for each of your hero units to 90. That'll be easier than using triggers for sure.


Nicodemus