• 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.
  • Vote for the theme of Hive's HD Modeling Contest #7! Click here to vote! - Please only vote if you plan on participating❗️

Trigger or JASS - Unit Momentum Please

Status
Not open for further replies.
Level 3
Joined
Jan 25, 2008
Messages
28
If anyone know how to do this please help.

I need a trigger that would make the units gain speed over a duration of moving and drop down back to the base speed when the unit stops and starts going again. All help is appreciated in this matter.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Perhaps something like this:

  • Boost Speed On
    • Events
      • Unit - A unit owned by Player 1 (Red) Is issued an order targeting an object
      • Unit - A unit owned by Player 1 (Red) Is issued an order targeting a point
    • Conditions
      • (Ordered unit) Equal to Hero1
    • Actions
      • Trigger - Turn on Boost Speed <gen>

  • Boost Speed
    • Events
      • Time - Every 0.11 seconds of game time
    • Conditions
    • Actions
      • Set SpeedBoostUnitLoc[0] = (Position of Hero1)
      • Wait 0.10 seconds
      • Set SpeedBoostUnitLoc[1] = (Position of Hero1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between SpeedBoostUnitLoc[0] and SpeedBoostUnitLoc[1]) Not equal to 0.00
        • Then - Actions
          • Unit - Set Hero1 movement speed to ((Current movement speed of Hero1) x 1.01)
        • Else - Actions
          • Trigger - Turn off (This trigger)
          • Unit - Set Hero1 movement speed to (Default movement speed of Hero1)
      • Custom script: call RemoveLocation (udg_SpeedBoostUnitLoc[0])
      • Custom script: call RemoveLocation (udg_SpeedBoostUnitLoc[1])
You need to experiment with the multiplier's value.
 
Status
Not open for further replies.
Top