- Joined
- Sep 29, 2006
- Messages
- 447
im trying to make a trigger in which if a unit comes within X range of a power up item, it will pick it up. I do not want to do this with a periodic trigger because then it interferes with another trigger that is in place. so far i have come up with this but it doesnt work (and i know why)
-
pick up item
-

Events
-

Conditions
-

Actions
-


Unit - Order (Picked unit) to Right-Click (Picked item)
-
-
-
pick up item add event
-

Events
-


Time - Every 5.00 seconds of game time
-
-

Conditions
-

Actions
-


Set PlayableMapRegionVar = (Playable map area)
-


Custom script: set bj_wantDestroyGroup = true
-


Item - Pick every item in (Playable map area) and do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Item-class of (Picked item)) Equal to Powerup
-
-





Then - Actions
-






Trigger - Add to pick up item <gen> the event (Unit - A unit comes within 400.00 of (Picked unit))
-
-





Else - Actions
-
-
-
-


Custom script: call RemoveRect(udg_PlayableMapRegionVar)
-
-

