HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Moving multiple units via triggers problem

01-21-2008, 11:54 PM#1
Skurai
I think i have to use something called unit arrays and i am not sure how to use them.

Basically i create a unit, make it move towards a point via an ability.
The problem is when i use the ability again, the movement works only on the new unit, the old unit stops moving towards its destination. The periodic movement trigger works only on the latest created unit, I need it to work on individual created units so it doesnt cause problems when i use the skill multiple times to create multiple units or when 2 heros use the same triggered skill.

How do i solve this problem??
01-22-2008, 12:26 AM#2
The Elite
just have 2 triggers, one to spawn the units and one to move them.
wait a minute for me to make code
Trigger:
Spawn
Collapse Events
Time - Every 2.00 seconds of game time
Conditions
Collapse Actions
Unit - Create 1 Footman for Player 1 (Red) at (Center of Spawn <gen>) facing Default building facing degrees
Trigger:
Move
Collapse Events
Unit - A unit enters Spawn <gen>
Conditions
Collapse Actions
Unit - Order (Entering unit) to Move To (Center of Move <gen>)