• 🏆 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!

Slide Trigger

Status
Not open for further replies.
Level 4
Joined
May 3, 2008
Messages
51
Hello, I need some help with my Slide Trigger, please.

My Variables:

tempLoc - Point
tempLoc2 - Point

  • Events:
  • Time - Every 0.04 seconds of game time
  • Conditions:
  • Actions:
  • Unit Group - Pick every unit in (Units of type Knight) and do (Actions)
    • Schleifen - Aktionen
      • Set tempLoc = (Position of (Picked unit))
      • Set tempLoc2 = (tempLoc offset by 11.00 towards (Facing of (Picked unit)) degrees)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • 'IF'-Conditions
          • (Terrain type at tempLoc) Gleich Northrend - Ice
        • 'THEN'-Actions
          • Unit - Move (Picked unit) instantly to tempLoc2
        • 'ELSE'-Aktionen
          • Do nothing
  • Custom script: call RemoveLocation(udg_tempLoc)
  • Custom script: call RemoveLocation(udg_tempLoc2)
The slide trigger works, but the Slider doesn't turn very good, I need to click about 5-10 times until the Slider turns where I wanted. Could anyone fix that, or give me a Slide Trigger, that works good?
 
Level 7
Joined
Jul 20, 2008
Messages
377
It's a real comparison that looks like this:

  • Math - Get Angle Between (position 1) and (position 2)
I'd say put the Unit - Set Unit Facing inside that THEN.

Also, remove the "Do nothing." It's a waste of processing time, it's just better to leave literally nothing there.

EDIT: Why'd you delete the post above mine?
 
Level 4
Joined
May 3, 2008
Messages
51
Very Very Very VERY VERY VEEEERY big thanks, I've got it now!
And I created a trigger like that:

Unit - A unit gets an issued order targeting a point

Conditions
And - All (Conditions) are true
Bedingungen
(Terrain type at (Position of (Ordered unit))) Gleich Northrend - Ice
(Unit-type of (Ordered unit)) Equal To Knight

Actions
Set Facing = (Angle from (Position of (Ordered unit)) to (Target point of issued order))
Unit - Make (Ordered unit) face Facing over 0.00 seconds
 
Level 7
Joined
Jul 20, 2008
Messages
377
(Angle from (Position of (Ordered unit)) to (Target point of issued order))

Red are leaks. Assign these to temp locs and remove them.
 
Status
Not open for further replies.
Top