• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Walk Duration Calculation ?"!?!"?

Status
Not open for further replies.
Level 11
Joined
Jul 28, 2007
Messages
920
Can i calculate how long time is required to unit walks from point A to point B ?
My unit's speed is 550. Range X, X is number beetwen A and B, and i must count that, its range beetwen Casting unit's and target point where i cast spell.

Anyway, i need this coz: when unit casts a spell, a rocket flyes from casting unit to target point of ability being casted,and when rocket is created, at start, it must go up, and close to target, must go down again; want it more realistic.
 
Level 11
Joined
Jul 28, 2007
Messages
920
Haha, me to, he probbly deleted, its moving from casting unit to the point where unit casts ability(where I want), directly moving.
Btw, this works fine, but where leaks, becouse it starts to lagg if i set all "For each (Integer A) from 1 to 100, do (Actions)" to 100, if i set to 10 its ok,but it leaks i supose.

  • Fire Missile
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
    • Actions
      • Wait 0.01 seconds
      • -------- -------------------------Team1------------------------- --------
      • -------- Missile --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Casting unit)) Equal to Player 1 (Red)
        • Then - Actions
          • -------- ============Single Missile Level 1 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Ability being cast) Equal to Fire Missile (A)
            • Then - Actions
              • Set Point_1 = (Target point of ability being cast)
              • -------- hull type --------
              • Unit - Create 1 Missile (light) for Player 11 (Dark Green) at (Position of (Casting unit)) facing 0.00 degrees
              • Unit - Order (Last created unit) to Neutral - Kaboom! Point_1
              • Point - Remove Point_1
            • Else - Actions
        • Else - Actions
  • Store Missile 1
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Owner of (Triggering unit)) Equal to Player 1 (Red)
      • (Unit-type of (Triggering unit)) Equal to Missile (light)
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Missile (hpulse)
          • (Unit-type of (Triggering unit)) Equal to Missile (heavy)
          • (Unit-type of (Triggering unit)) Equal to Missile (anti air)
    • Actions
      • For each (Integer A) from 1 to 100, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Missile1_store[(Integer A)] is alive) Equal to False
            • Then - Actions
              • Set Missile1_store[(Integer A)] = (Entering unit)
              • Skip remaining actions
            • Else - Actions
  • Set Missile Point 1
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Owner of (Casting unit)) Equal to Player 1 (Red)
    • Actions
      • For each (Integer A) from 1 to 100, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Missile1_store[(Integer A)] is alive) Equal to False
            • Then - Actions
              • Set Point1_store[(Integer A)] = (Target point of ability being cast)
              • Skip remaining actions
            • Else - Actions
  • Missile Down 1
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 100, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in (Units within 800.00 of Point1_store[(Integer A)]) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Picked unit) Equal to Missile1_store[(Integer A)]
                • Then - Actions
                  • Unit - Kill (Picked unit)
                • Else - Actions
          • Unit Group - Destroy unit group (Last created unit group)

OK LAST TRIGGER LEAKS, WHY?
 
Status
Not open for further replies.
Top