• 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.

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?
 
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