- Joined
- Aug 24, 2010
- Messages
- 133
ive been trying to make a repick command and it works up to getting a new hero and setting the variables to put the skills on but the skills arnt added
comments to improve my triggering also welcome
especially at the end of the 2nd trigger id like to do a loop until so that heros cant spawn in spots that already have heros there
heres my triggers
comments to improve my triggering also welcome
especially at the end of the 2nd trigger id like to do a loop until so that heros cant spawn in spots that already have heros there
heres my triggers
-
repick
-
Events
- Player - Player 1 (Red) types a chat message containing -repick as An exact match
- Player - Player 2 (Blue) types a chat message containing -repick as An exact match
- Player - Player 3 (Teal) types a chat message containing -repick as An exact match
- Player - Player 4 (Purple) types a chat message containing -repick as An exact match
-
Conditions
- picked[(Player number of (Triggering player))] Equal to True
-
Actions
- Unit Group - Pick every unit in (Units in (Playable map area)) and do (If (((Picked unit) is selected by (Owner of (Picked unit))) Equal to True) then do (Unit - Remove (Picked unit) from the game) else do (Do nothing))
- Set hero_picks[(Player number of (Triggering player))] = No unit
- Set picked[(Player number of (Triggering player))] = False
- Camera - Pan camera for (Triggering player) to (Center of selection area <gen>) over 0.00 seconds
- Visibility - Enable visibility_modifier[(Player number of (Triggering player))]
- Player - Enable death coil - Spell Book for (Triggering player)
- Player - Enable Avatar - Spell Book for (Triggering player)
- Player - Enable animate dead - Spell Book for (Triggering player)
- Player - Enable drudge skeletons - Spell Book for (Triggering player)
- Player - Enable forest troll - Spell Book for (Triggering player)
- Player - Enable gnoll - Spell Book for (Triggering player)
- Player - Enable golem - Spell Book for (Triggering player)
- Player - Enable prodigal sorcerer - Spell Book for (Triggering player)
- Player - Enable unholy aura - Spell Book for (Triggering player)
- Player - Enable soldier - Spell Book for (Triggering player)
- Player - Enable wisp - Spell Book for (Triggering player)
- Trigger - Turn on hero selection p1 <gen>
-
Events
-
hero selection p1
-
Events
- Player - Player 1 (Red) Selects a unit
-
Conditions
- picked[(Player number of (Triggering player))] Equal to False
- time Equal to True
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (lvl 1 <gen> contains (Triggering unit)) Equal to True
-
Then - Actions
- Set selection_1[(Player number of (Triggering player))] = (Triggering unit)
- Set string_sk1[(Player number of (Triggering player))] = (Name of (Triggering unit))
- Set picked_1[(Player number of (Triggering player))] = True
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (lvl 2 <gen> contains (Triggering unit)) Equal to True
-
Then - Actions
- Set selection_2[(Player number of (Triggering player))] = (Triggering unit)
- Set string_sk2[(Player number of (Triggering player))] = (Name of (Triggering unit))
- Set picked_2[(Player number of (Triggering player))] = True
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (lvl 3 <gen> contains (Triggering unit)) Equal to True
-
Then - Actions
- Set selection_3[(Player number of (Triggering player))] = (Triggering unit)
- Set string_sk3[(Player number of (Triggering player))] = (Name of (Triggering unit))
- Set picked_3[(Player number of (Triggering player))] = True
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (heros <gen> contains (Triggering unit)) Equal to True
-
Then - Actions
- Set hero_p1[(Player number of (Triggering player))] = (Unit-type of (Triggering unit))
- Set string_sk4[(Player number of (Triggering player))] = (Name of (Triggering unit))
- Set picked_4[(Player number of (Triggering player))] = True
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (help <gen> contains (Triggering unit)) Equal to True
-
Then - Actions
- Game - Display to Player Group - Player 1 (Red) the text: Pick a colour of ea...
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (done <gen> contains (Triggering unit)) Equal to True
- picked_1[(Player number of (Triggering player))] Equal to True
- picked_2[(Player number of (Triggering player))] Equal to True
- picked_3[(Player number of (Triggering player))] Equal to True
- picked_4[(Player number of (Triggering player))] Equal to True
-
Then - Actions
- Set ran_num = (Random integer number between 0 and 6)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (start area 1 <gen> contains No unit) Equal to True
- ran_num Equal to 1
-
Then - Actions
- Unit - Create 1 hero_p1[(Player number of (Triggering player))] for (Triggering player) at (Random point in region[ran_num]) facing (Center of (Playable map area))
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (start area 2 <gen> contains No unit) Equal to True
- ran_num Equal to 2
-
Then - Actions
- Unit - Create 1 hero_p1[(Player number of (Triggering player))] for (Triggering player) at (Random point in region[ran_num]) facing (Center of (Playable map area))
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (start area 3 <gen> contains No unit) Equal to True
- ran_num Equal to 3
-
Then - Actions
- Unit - Create 1 hero_p1[(Player number of (Triggering player))] for (Triggering player) at (Random point in region[ran_num]) facing (Center of (Playable map area))
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (start area 4 <gen> contains No unit) Equal to True
- ran_num Equal to 4
-
Then - Actions
- Unit - Create 1 hero_p1[(Player number of (Triggering player))] for (Triggering player) at (Random point in region[ran_num]) facing (Center of (Playable map area))
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (start area 5 <gen> contains No unit) Equal to True
- ran_num Equal to 5
-
Then - Actions
- Unit - Create 1 hero_p1[(Player number of (Triggering player))] for (Triggering player) at (Random point in region[ran_num]) facing (Center of (Playable map area))
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Set ran_num = (ran_num + 1)
- Unit - Create 1 hero_p1[(Player number of (Triggering player))] for (Triggering player) at (Random point in region[ran_num]) facing (Center of (Playable map area))
- Selection - Select (Last created unit) for Player 1 (Red)
- Set hero_picks[(Player number of (Triggering player))] = (Last created unit)
- Camera - Pan camera for Player 1 (Red) to (Position of (Last created unit)) over 0.00 seconds
- Set picked[(Player number of (Triggering player))] = True
- Trigger - Add skill learning <gen> to the trigger queue (Checking conditions)
- Trigger - Turn off (This trigger)
- Else - Actions
-
skill learning
- Events
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- selection_1[(Player number of (Triggering player))] Equal to Black lvl 1 0015 <gen>
-
Then - Actions
- Unit - Add drudge skeletons - Spell Book to hero_picks[(Player number of (Triggering player))]
- Player - Disable drudge skeletons - Spell Book for (Owner of hero_picks[(Player number of (Triggering player))])
- Unit - Add death coil - Spell Book to hero_picks[(Player number of (Triggering player))]
- Player - Disable death coil - Spell Book for (Owner of hero_picks[(Player number of (Triggering player))])
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- -------- etc --------