Super.Gnome
New Member
- Reaction score
- 0
I have this trigger that I'd like to reuse roughly 20 more times to spawn different unit types, using the same variable.
Is there anyway to format this trigger, and the others, so that I can reuse the variable on multiple unit spawns that may be happening simultaneously? I'm under the impression I can't as is because of the sleep action.
Trigger:
- Archer wave Light
- Events
- Unit - A unit enters Mainbase light <gen>
- Conditions
- (Unit-type of (Entering unit)) Equal to Hire Archer Reinforcement
- Actions
- Set WPoints[0] = (Position of (Triggering unit))
- Unit - Remove (Triggering unit) from the game
- For each (Integer A) from 1 to 6, do (Actions)
- Loop - Actions
- Set WPoints[1] = (Random point in Light Wave Spawn <gen>)
- Set WPoints[2] = (Random point in Light Wave Spawn <gen>)
- Unit - Create 3 Archer for Player 10 (Light Blue) at WPoints[1] facing WPoints[0]
- Unit - Create 3 Archer for Player 10 (Light Blue) at WPoints[2] facing WPoints[0]
- Custom script: call RemoveLocation (udg_WPoints[1])
- Custom script: call RemoveLocation (udg_WPoints[2])
- Custom script: call TriggerSleepAction( 5. )
- Loop - Actions
- Custom script: call RemoveLocation (udg_WPoints[0])
- Events
Is there anyway to format this trigger, and the others, so that I can reuse the variable on multiple unit spawns that may be happening simultaneously? I'm under the impression I can't as is because of the sleep action.