Ok im having a problem with this variable*Array* I made. The variable is supposed to when used its going to be used for every player doing the trigger. But the problem is when a person does the trigger it only sets the variable for the first person doing the action and all the other players can not do anything since the whole map runs on using that one variable. Can anyone tell me what the problem is so I can fix it and get this map on the roll. Please and thank you in advance.
-
HeroSelection
-
Events
- Player - Player 1 (Red) Selects a unit
- Player - Player 2 (Blue) Selects a unit
- Player - Player 3 (Teal) Selects a unit
- Player - Player 4 (Purple) Selects a unit
- Player - Player 5 (Yellow) Selects a unit
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering unit) Equal to Selection Button Choose 0005 <gen>
-
Then - Actions
- Selection - Clear selection for (Triggering player)
- Unit - Create 1 C88 for (Triggering player) at (Center of TestSelect <gen>) facing Default building facing degrees
- Set SelectionUnit[(Player number of (Triggering player))] = (Last created unit)
- Trigger - Run Loading <gen> (checking conditions)
- Trigger - Turn on Selected Unit <gen>
- Selection - Select SelectionUnit[(Player number of (Triggering player))] for (Owner of (Last created unit))
- Unit - Pause SelectionUnit[(Player number of (Triggering player))]
- Wait 20.00 seconds
- Cinematic - Hide filter
- Unit - Create 1 Dummy for Neutral Passive at (Center of TestSelect <gen>) facing Default building facing degrees
- Unit - Remove (Last created unit) from the game
- Item - Create Test Gun at (Position of SelectionUnit[(Player number of (Triggering player))])
- Hero - Give (Last created item) to SelectionUnit[(Player number of (Triggering player))]
- Player - Add 20 to (Owner of SelectionUnit[(Player number of (Triggering player))]) Current lumber
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Triggering unit) Equal to Selection Button Choose 0015 <gen>
-
Then - Actions
- Selection - Clear selection for (Triggering player)
- Unit - Create 1 D90 for (Triggering player) at (Center of TestSelect <gen>) facing Default building facing degrees
- Set SelectionUnit[(Player number of (Triggering player))] = (Last created unit)
- Trigger - Run Loading <gen> (checking conditions)
- Trigger - Turn on Selected Unit <gen>
- Selection - Select SelectionUnit[(Player number of (Triggering player))] for (Owner of (Last created unit))
- Unit - Pause SelectionUnit[(Player number of (Triggering player))]
- Wait 20.00 seconds
- Cinematic - Hide filter
- Unit - Create 1 Dummy for Neutral Passive at (Center of TestSelect <gen>) facing Default building facing degrees
- Unit - Remove (Last created unit) from the game
- Item - Create Test Gun at (Position of SelectionUnit[(Player number of (Triggering player))])
- Hero - Give (Last created item) to SelectionUnit[(Player number of (Triggering player))]
- Player - Add 20 to (Owner of SelectionUnit[(Player number of (Triggering player))]) Current lumber
- 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