- Joined
- Jul 24, 2008
- Messages
- 180
Okay, I have this formula... (((-1/d*d)x*x)*d+d)
Where...
d=1/2 the distance between start and end points
x=horizontal cooridinate of moving object
I'm trying to implement this with X and Z values, where Z is height. It works, except the height never changes. I'll paste the code below and attach the map, as I'm not sure if my classifications in the object editor are correct.
#0=target point
#1=total distance
#2=missile dummy
#3=x-value
#4=elapsed time
#5=caster
Distance=1/2(#1)
Where...
d=1/2 the distance between start and end points
x=horizontal cooridinate of moving object
I'm trying to implement this with X and Z values, where Z is height. It works, except the height never changes. I'll paste the code below and attach the map, as I'm not sure if my classifications in the object editor are correct.
-
Freeze Throw Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Freeze Toss
-
-
Actions
-
Unit Group - Add (Triggering unit) to FreezeThrowing
-
Hashtable - Save Handle Of(Triggering unit) as 5 of (Key (Triggering unit)) in FreezeThrowtable
-
Set Temploc = (Target point of ability being cast)
-
Hashtable - Save Handle OfTemploc as 0 of (Key (Triggering unit)) in FreezeThrowtable
-
Hashtable - Save (Distance between (Position of Caster) and Temploc) as 1 of (Key (Triggering unit)) in FreezeThrowtable
-
Set Distance = ((Load 1 of (Key (Triggering unit)) from FreezeThrowtable) / 2.00)
-
Hashtable - Save (-1.00 x Distance) as 3 of (Key (Triggering unit)) in FreezeThrowtable
-
Hashtable - Save 0.00 as 4 of (Key (Triggering unit)) in FreezeThrowtable
-
Custom script: call RemoveLocation(udg_Temploc)
-
Set Temploc = ((Position of (Triggering unit)) offset by ((Load 1 of (Key (Triggering unit)) from FreezeThrowtable) / 10.00) towards (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees)
-
Unit - Create 1 Freeze Throw Dummy for (Owner of (Triggering unit)) at Temploc facing (Target point of ability being cast)
-
Unit - Set (Last created unit) movement speed to Distance
-
Custom script: call RemoveLocation(udg_Temploc)
-
Set Temploc = (Target point of ability being cast)
-
Unit - Order (Last created unit) to Move To Temploc
-
Custom script: call RemoveLocation(udg_Temploc)
-
Hashtable - Save Handle Of(Last created unit) as 2 of (Key (Triggering unit)) in FreezeThrowtable
-
-
-
Freeze Throw
-
Events
-
Time - Every 0.01 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in FreezeThrowing and do (Actions)
-
Loop - Actions
-
Hashtable - Save ((Load 4 of (Key (Picked unit)) from FreezeThrowtable) + 0.01) as 4 of (Key (Picked unit)) in FreezeThrowtable
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Load 4 of (Key (Picked unit)) from FreezeThrowtable) Greater than or equal to 2.00
-
-
Then - Actions
-
Set Temploc = (Position of (Load 2 of (Key (Picked unit)) in FreezeThrowtable))
-
Special Effect - Create a special effect at Temploc using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
-
Unit - Cause (Load 5 of (Key (Picked unit)) in FreezeThrowtable) to damage circular area after 0.00 seconds of radius 200.00 at Temploc, dealing 100.00 damage of attack type Spells and damage type Cold
-
Special Effect - Destroy (Last created special effect)
-
Custom script: call RemoveLocation(udg_Temploc)
-
Unit Group - Remove (Load 5 of (Key (Picked unit)) in FreezeThrowtable) from FreezeThrowing
-
Unit - Remove (Load 2 of (Key (Picked unit)) in FreezeThrowtable) from the game
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in FreezeThrowtable
-
-
Else - Actions
-
Game - Display to (Player group((Player((Player number of (Owner of (Load 5 of (Key (Picked unit)) in FreezeThrowtable))))))) the text: Works!
-
Set Temploc = (Position of (Load 2 of (Key (Picked unit)) in FreezeThrowtable))
-
Hashtable - Save ((Load 3 of (Key (Picked unit)) from FreezeThrowtable) + ((Current movement speed of (Load 2 of (Key (Picked unit)) in FreezeThrowtable)) / 100.00)) as 3 of (Key (Picked unit)) in FreezeThrowtable
-
Animation - Change (Load 2 of (Key (Picked unit)) in FreezeThrowtable) flying height to ((((-1.00 / (Distance x Distance)) x Distance) x ((Load 3 of (Key (Picked unit)) from FreezeThrowtable) x (Load 3 of (Key (Picked unit)) from FreezeThrowtable))) + Distance) at 0.01
-
Custom script: call RemoveLocation(udg_Temploc)
-
-
-
-
-
-
#0=target point
#1=total distance
#2=missile dummy
#3=x-value
#4=elapsed time
#5=caster
Distance=1/2(#1)