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

Improving Trigger

Status
Not open for further replies.
Level 9
Joined
Apr 7, 2010
Messages
480
  • Move Left
    • Events
      • Time - Every 0.06 seconds of game time
    • Conditions
    • Actions
      • Animation - Play Unit's walk animation
      • Set Position = ((Position of Unit) offset by 0.00 towards ((Facing of Unit) + 45.00) degrees)
      • Unit - Move Unit instantly to Position, facing ((Facing of Unit) + 8.00) degrees
      • Custom script: call RemoveLocation(udg_Position)
  • Move Right
    • Events
      • Time - Every 0.06 seconds of game time
    • Conditions
    • Actions
      • Animation - Play Unit's walk animation
      • Set Position = ((Position of Unit) offset by 0.00 towards ((Facing of Unit) - 90.00) degrees)
      • Unit - Move Unit instantly to Position, facing ((Facing of Unit) - 8.00) degrees
      • Custom script: call RemoveLocation(udg_Position)
im having a bit of a problem with this trigger. prevents my player from using spells while moving left or right. how do i fix this?
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
Action 'Unit - Move Instantly' interrupts all the orders unit currently has.
The idea is to use SetUnitX/Y functions - this way you can move units without any interruption.

Although as I can see, the only action you are trying to perform is changing the facing angle of unit. Using one of actions: Unit - Make Unit Face Point/Agnle/Unit would be much more suitable than changing it's position actually to the same one but with differend angle, wouldn't it?

Additionaly your triggger leaks (Position of Unit) - you have to set it to location variable and remove afterwards, just like you did with 'Position'.
 
Status
Not open for further replies.
Top