- Joined
- Jun 17, 2010
- Messages
- 2,275
Im making an auto selection system that selects units within a range and making you able to quick cast spells on the units without selecting them. It tells me Selected Unit: and thats it. Its supposed to tell me the unit type...
-
Selectable Units
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 1 to (Number of players in (All players controlled by a User player)), do (Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units within 1000.00 of (Position of SelectedUnit[(Integer A)])) and do (Actions)
-
Loop - Actions
- Set SelectableUnits[(Integer A)] = (Last created unit group)
-
Loop - Actions
-
Unit Group - Pick every unit in (Units within 1000.00 of (Position of SelectedUnit[(Integer A)])) and do (Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to (Number of players in (All players controlled by a User player)), do (Actions)
-
Events
-
Picked Unit
-
Events
- Player - Player 1 (Red) Selects a unit
- Player - Player 2 (Blue) Selects a unit
-
Conditions
- (Owner of (Triggering unit)) Equal to (Triggering player)
-
Actions
- Set SelectedUnit[(Player number of (Triggering player))] = (Triggering unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of (Triggering unit)) Equal to Player 1 (Red)
-
Then - Actions
- Set SelectedEnemy[1] = (Random unit from SelectableUnits[1])
- Game - Display to (All players) the text: Press ESC to swap b...
- Game - Display to Player Group - Player 1 (Red) the text: (Selected Enemy: + (String((Unit-type of SelectedEnemy[1]))))
- Else - Actions
-
If - Conditions
-
Events
-
Unit Selection Swap
-
Events
- Player - Player 1 (Red) skips a cinematic sequence
- Player - Player 2 (Blue) skips a cinematic sequence
- Conditions
-
Actions
- Set SelectedEnemy[(Player number of (Triggering player))] = (Random unit from SelectableUnits[(Player number of (Triggering player))])
- Game - Display to (All players matching ((Triggering player) Equal to Player 1 (Red))) the text: (Selected Enemy: + (String((Unit-type of SelectedEnemy[(Player number of (Triggering player))]))))
- Game - Display to (All players matching ((Triggering player) Equal to Player 2 (Blue))) the text: (Selected Enemy: + (String((Unit-type of SelectedEnemy[(Player number of (Triggering player))]))))
-
Events