HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

PLZZ HELP i can't find the mistake...

08-13-2007, 04:18 PM#1
A Dreamer
I'm making a maps where you can select and hire heros from a tavern (nothing fancy here... every1 do that). I want every time a player pick a hero the picked hero unit to be dissabled ofr all the other players to pick and all the remaining units to be dissabled for every player that has allready picked a hero unit. So i made a couple of triggers and i used 2 heros to test them. The trigger that dissables the picked unit from all players works fine.
the trigger that dissables alla the remaining hero for every player that has allready picked does NOTHING.... here is what i did

1) i made a variable called heros
2) i made a triger that puts the 2 hero units into the varialbe heros:
Set Heros[1] = heroA
Set Heros[2] = heroB

3) then i made the following trigger that is activated every time a unit is sold from the tavern
For each (Integer A) from 1 to 2, do (Player - Make Heros[(Integer A)] Unavailable for training/construction by (Owner of (Sold unit)))

But still after i pick one of these units the other is available for hiring and i can have 2 heros.... I've been working on this part of the mod for 3 days and i can't find any errors!!!! i've allmost completed the mod and that is the only part that delays me plz if you see any error tell my i'm dying to know!!!!!!!
08-13-2007, 06:15 PM#2
Histenchist
Uhh maybe you could give us it in trigger tags.
08-13-2007, 10:15 PM#3
sas_Skorpion
Try checking this thing ... i had some problems with that ...

- Check near the "Array" option the size of the array variable ... set it to 2 or more if u need more copyes

and if you're not sure about that u can always make a test trigger that removes those 2 specific type of heroes to see if the "Make Heros[(Integer A)] Unavailable for training/construction" is working properly :)

EDIT : BTW i just noticed something - as far as i know you can only make unavailable a hero type not the specific hero ...
08-13-2007, 10:53 PM#4
botanic
I made a tut on this its at http://www.wc3campaigns.net/showthread.php?t=92484
08-23-2007, 08:17 AM#5
A Dreamer
Thank you all guys for your interest..

well the mistake was a silly one... so silly that i coudn't notice it for about 3 days...

When i was setting variables to hero types i forgot to put an event cause somehow i thought another trigger was running this after a few seconds...