- Joined
- Jan 6, 2008
- Messages
- 2,627
I just tried for a Grenade spell, but it errors
-
Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Gr|cffffcc00e|rnade
-
-
Actions
-
Custom script: local effect udg_GrenadeEffect
-
Custom script: local integer udg_GrenadeInteger
-
Custom script: local unit udg_GrenadeUnit
-
Custom script: local unit udg_GrenadeMissile
-
Custom script: local location udg_GrenadePoint
-
Set GrenadeInteger = 50
-
Set GrenadeUnit = (Triggering unit)
-
Special Effect - Create a special effect attached to the left, hand of GrenadeUnit using war3mapImported\Grenade2.mdx
-
Set GrenadeEffect = (Last created special effect)
-
Unit - Pause GrenadeUnit
-
Special Effect - Destroy GrenadeEffect
-
Wait 0.10 seconds
-
Animation - Play GrenadeUnit's Spell Throw Alternate animation
-
Wait 1.00 seconds
-
Unit - Unpause GrenadeUnit
-
Animation - Play GrenadeUnit's Stand animation
-
Set GrenadePoint = (Position of GrenadeUnit)
-
Unit - Create 1 Grenade for (Owner of GrenadeUnit) at GrenadePoint facing (Facing of GrenadeUnit) degrees
-
Set GrenadeMissile = (Last created unit)
-
Set GrenadePoint2 = (GrenadePoint offset by (5000.00, 0.00))
-
Custom script: call RemoveLocation(udg_GrenadePoint)
-
Unit - Order GrenadeMissile to Move To GrenadePoint2
-
For each (Integer A) from 1 to 200, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GrenadeInteger Less than or equal to 100
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GrenadeInteger Less than or equal to 100
-
-
Then - Actions
-
Wait 0.01 seconds
-
Set GrenadeInteger = (GrenadeInteger + 30)
-
Animation - Change GrenadeMissile flying height to (Real(GrenadeInteger)) at 0.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
GrenadeInteger Greater than or equal to 100
-
-
Then - Actions
-
Wait 0.01 seconds
-
Animation - Change GrenadeMissile flying height to ((Current flying height of GrenadeMissile) - 30.00) at 0.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Integer((Current flying height of GrenadeMissile))) Equal to 0
-
-
Then - Actions
-
Unit - Kill GrenadeMissile
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
Custom script: call RemoveLocation(udg_GrenadePoint2)
-
-