• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Antistuck.. (oh god, evil thread returns!)

Status
Not open for further replies.
Level 5
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:

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.
 
Level 4
Joined
Aug 11, 2005
Messages
101
you can always give builders an ability that when used it makes the unit move to the end region. but if you don't want to do that method or the anti-stuck tower method than you might have to stick with that(change how often it runs maybe?)
 
Level 5
Joined
Nov 14, 2004
Messages
159
I wish I could do something about how often it run but here's what happen.

If I make it set off less often (larger Stuckwait number every unit died) THEN unstucking unit takes LONG time.

And if I make it set off more often (smaller Stuckwait number every unit died) THEN it cause every units come to stop more rapidly.

But hey that gave me idea, more units on screen set off less often and less creep set off more often. I'll see what I can.

*edit:

I had replaced "Unit died" part with stuckwait to Set stuckwait = (((Player 1 (Red) Food used) + (Player 7 (Green) Food used)) / 4), it works like beautiful - if there's 120 units on screen meaning you wait 30 seconds until antistuck goes off and then if there 8 units on screen meaning you only wait 2 seconds until antistuck goes off. Sorry for such quickly solved thread, idea doesn't pop in until I try explain in detail. :lol:
 
Status
Not open for further replies.
Top