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

[Trigger] How to calculate this?

Status
Not open for further replies.
  • Deadly Throw
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Deadly Throw
    • Actions
      • Set TempLoc34 = (Position of (Triggering unit))
      • Set TempLoc35 = (Position of (Target unit of ability being cast))
      • Set DistanceVar02 = ((Distance between TempLoc34 and TempLoc35) / 2.00)
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing DistanceVar02 damage of attack type Spells and damage type Normal
      • Floating Text - Create floating text that reads (String((Integer(DistanceVar02)))) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
      • Set FloatingTextVar[4] = (Last created floating text)
      • Floating Text - Show (Last created floating text) for (All players)
      • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 90.00 degrees
      • Wait 2.00 game-time seconds
      • Floating Text - Destroy FloatingTextVar[4]
      • Custom script: call RemoveLocation (udg_TempLoc34)
      • Custom script: call RemoveLocation (udg_TempLoc35)
now i'm using this trigger it works nice, but there is one problem. Since the distance is different every time i cast the spell, i cant use normal "wait" is should use "special" wait that calculates (missle speed, and distance between units) and put the result as "wait" So the damage and the floating text wouldn't appear to fast.

Ok, so the missle speed is 1000, max cast range is 800

And yeah where i need to put wait in (4th line in actions)
  • Deadly Throw
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Deadly Throw
    • Actions
      • Set TempLoc34 = (Position of (Triggering unit))
      • Set TempLoc35 = (Position of (Target unit of ability being cast))
      • Set DistanceVar02 = ((Distance between TempLoc34 and TempLoc35) / 2.00)
      • Wait ((1.00 + (1.00 + 1.00)) + 1.00) game-time seconds
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing DistanceVar02 damage of attack type Spells and damage type Normal
      • Floating Text - Create floating text that reads (String((Integer(DistanceVar02)))) above (Target unit of ability being cast) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
      • Set FloatingTextVar[4] = (Last created floating text)
      • Floating Text - Show (Last created floating text) for (All players)
      • Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 80.00 towards 90.00 degrees
      • Wait 2.00 game-time seconds
      • Floating Text - Destroy FloatingTextVar[4]
      • Custom script: call RemoveLocation (udg_TempLoc34)
      • Custom script: call RemoveLocation (udg_TempLoc35)
If someone would be that nice, that would help me out.

Thanks!

-BerZeKeR-
 
Level 12
Joined
Aug 18, 2006
Messages
1,193
or you could just remove the stupid Destroy Floating text and replace it above the wait with a action(forgot the name) that sets an age for the Floating text, so after the time has gone, it will be removed

and place the leak destroyers under the Set DistanceVar so that the leaks are destroyed directly after they have been used
 
Status
Not open for further replies.
Top