- Joined
- Nov 14, 2004
- Messages
- 159
I don't really like my current antistuck triggers that I have right now because:
1. When antistuck trigger goes off, it makes EVERY unit come to stop and takes a bit a while for each one to move again.
2. After killing every last units except those unit became stuck, it take a while to wait until antistuck trigger to set off.
Mine is currently something like:
(some event) Create # units at region, move to end region, Set (var)Stuckwait to 50 (and vary other actions)
Unit died, set (var)Stuckwait to 15 (and vary other actions)
And importantly my antistuck trigger:
But I can't think of any idea to improve this antistuck triggers. I wanted to avoid "Unit Group - Pick ALL unit". I couldn't even make something like this:
Event -
- Every 1 second
Condition -
Action -
- Randomly pick one of unit in playable map
- Set (var)unitlocation = point
- Wait 0.5 second
- If (var)unitlocation Equal To Location of (picked) Unit then Unit - Move To endregion
Help me out to make my map even more fun to play.
1. When antistuck trigger goes off, it makes EVERY unit come to stop and takes a bit a while for each one to move again.
2. After killing every last units except those unit became stuck, it take a while to wait until antistuck trigger to set off.
Mine is currently something like:
(some event) Create # units at region, move to end region, Set (var)Stuckwait to 50 (and vary other actions)
Unit died, set (var)Stuckwait to 15 (and vary other actions)
And importantly my antistuck trigger:
Code:
antistuck
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Set stuckwait = (stuckwait - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
stuckwait Equal to 0
Then - Actions
Set temp_group = (Units owned by Player 7 (Green))
Set temp_point = (Center of endleft <gen>)
Unit Group - Pick every unit in temp_group and do (Unit - Order (Picked unit) to Move To temp_point) else do (Do nothing)
Custom script: call DestroyGroup (udg_temp_group)
Custom script: call RemoveLocation (udg_temp_point)
Set temp_group = (Units owned by Player 1 (Red))
Set temp_point = (Center of endright <gen>)
Unit Group - Pick every unit in temp_group and do (Unit - Order (Picked unit) to Move To temp_point) else do (Do nothing)
Custom script: call DestroyGroup (udg_temp_group)
Custom script: call RemoveLocation (udg_temp_point)
Set stuckwait = 15
Else - Actions
Do nothing
But I can't think of any idea to improve this antistuck triggers. I wanted to avoid "Unit Group - Pick ALL unit". I couldn't even make something like this:
Event -
- Every 1 second
Condition -
Action -
- Randomly pick one of unit in playable map
- Set (var)unitlocation = point
- Wait 0.5 second
- If (var)unitlocation Equal To Location of (picked) Unit then Unit - Move To endregion
Help me out to make my map even more fun to play.