| 10-14-2004, 02:41 PM | #1 |
I have a trigger that brings up a dialog box when a player presses ESC. I want it so that when a player click a dialog button, it selects their hero (each player has 1 hero) and uses a trigger on it. How do i make it so that any player can just press ESC and it automaticly selects their hero? This is the trigger i got so far: Hero- Modify Strength of (Random unit from (Units owned by (Triggering Player) matching(((- unit) is A Hero) Equal to True) The - is what i need to set correctly for it to work i think. Any ideas? Or is it all wrong!? Please help me. I give Reputation point to anyone who solves my problem ;) I really need an anser to this 'cause otherwise i cant continue my RPG :( UPDATEYayayayy i fixed it all by myself :P [/font] Hero- Modify Strength of (Random unit from (Units owned by (Triggering Player) matching(((Matching Unit) is A Hero) Equal to True) |
| 10-14-2004, 06:13 PM | #2 |
This might not be the right answer to your question, but the F1 button will select the first hero of Player X. (F2 & F3 will select 2nd & 3rd) |
| 10-14-2004, 07:16 PM | #3 |
Nah, it got to be done automaticly by Triggers |
| 10-14-2004, 08:34 PM | #4 |
Code:
Event (what happent after player pressed ESC) Conditions Actions Hero[1]=MK Hero[2]=DA Hero[3]=DH Hero[4]=FS Hero[5]=Kel'Thuzad TotalHeros = 5 (total heroes u have) For Integer B from 1 to 10 do actions - Actions ---If Player[b] slot is equal to [ is playing ] then [color=Blue]-----Set MyInteger = random integer between 1 and TotalHeros -----Create 1 unit-type of Hero[MyInteger] for Player[Integer B] -----Set Hero[MyInteger]= Hero[TotalHeros] -----Set TotalHeros = TotalHeros - 1 You need an Integer array named Hero. A simple integer named TotalHeros A simple integer Named MyInteger ---Else ----- Do nothing give it a try. i can't remember very well c ya.[/color] |
