• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Sliding question

Status
Not open for further replies.
Level 6
Joined
Apr 15, 2012
Messages
205
I wonder if there is any more effective way to create a sliding trigger for SC2 than mine.

  • Stop Move
    • Events
      • Unit - Any Unit is issued an order to Move
    • Local Variables
    • Conditions
      • (Unit type of (Triggering unit)) == Survivor (Male)
    • Actions
      • General - Wait 0.0 Game Time seconds
      • Unit - Order (Triggering unit) to ( Stop) (Replace Existing Orders)


  • Slide
    • Events
      • Timer - Every 0.06 seconds of Game Time
    • Local Variables
    • Conditions
    • Actions
      • Unit Group - Pick each unit in (Survivor (Male) units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
        • Actions
          • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 0.25 towards (Facing of (Picked unit)) degrees) (Blend)
Or this one which only requires one trigger:

  • Slide 2
    • Events
      • Timer - Every 0.06 seconds of Game Time
    • Local Variables
    • Conditions
    • Actions
      • Unit Group - Pick each unit in (Survivor (Male) units in (Entire map) owned by player 1 matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
        • Actions
          • Unit - Order (Picked unit) to ( Stop) (Replace Existing Orders)
          • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 0.25 towards (Facing of (Picked unit)) degrees) (Blend)
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
No idea what the first trigger is for... When a unit is ordered to a place it should start turning to the point you ordered but keep moving in the direction it was going for a while (true slide). Think of a car skidding.

In WarCraft III people used some annoying low quality slide which forced one to mangle ones mouse to get your guy to respond. This was because people had no idea how to trigger a proper slide system and instead relied on a hacky work around.

The second trigger can be optimized by caching the search results in a presistant group. Additionally things like "Picked unit" could be cached in a local variable reducing coupling.
 
Level 6
Joined
Apr 15, 2012
Messages
205
I made the unit stop because otherwise it will always be turned towards the point. I can reduce the turn rate of the unit, then it will not slide to the new position immediately. I don't know how to make it not require spam clicking though.
 
I made the unit stop because otherwise it will always be turned towards the point. I can reduce the turn rate of the unit, then it will not slide to the new position immediately. I don't know how to make it not require spam clicking though.

Instead of telling the trigger to stop the unit and force it in the direction he's facing you should have a point created based on where on the map is clicked in comparison to the unit and force it in that direction. Then no matter what way the unit is facing it will always slide one way.
 
Level 6
Joined
Apr 15, 2012
Messages
205
But how do I abort the move action? I don't want my unit to look at the point where I ordered it to move.

I tried out Polar Escape 5 for WC3. It has a very good sliding system, can you guys tell me how to create a similar one?
 
Last edited:
But how do I abort the move action? I don't want my unit to look at the point where I ordered it to move.

I tried out Polar Escape 5 for WC3. It has a very good sliding system, can you guys tell me how to create a similar one?

constantly issue an order to move to the target direction, or maybe try changing the unit's owner back and forth quickly.

Or perhaps try pausing it?
Something should work.
 
Level 6
Joined
Apr 15, 2012
Messages
205
How do I pause units? I know that you could do it in wc3, but I haven't found it yet in sc2
 
Status
Not open for further replies.
Top