neckface
terrain contest winner! :) dance contest loser. :(
- Reaction score
- 34
[RESOLVED]
Hello,
I'm perplexed as to why my Wall of Fire spell (which is meant to create a spaced-out triple flame strike perpendicular to the facing angle of the caster) will often cause a fatal error.
Any help appreciated.
Here's the code:
Hello,
I'm perplexed as to why my Wall of Fire spell (which is meant to create a spaced-out triple flame strike perpendicular to the facing angle of the caster) will often cause a fatal error.
Any help appreciated.
Here's the code:
Code:
WallOfFire
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Wall of Fire
Actions
Set wallCaster = (Triggering unit)
Set CasterPoint = (Position of wallCaster)
Set TargetPoint = (Target point of ability being cast)
Set Distance = (Distance between CasterPoint and TargetPoint)
Set wallMidPoint = (CasterPoint offset by (Distance / 1.00) towards (Angle from CasterPoint to TargetPoint) degrees)
Set wallPoint1 = (TargetPoint offset by 300.00 towards (((Angle from wallMidPoint to TargetPoint) + 90.00) + 0.00) degrees)
Set wallPoint2 = (TargetPoint offset by 350.00 towards (((Angle from wallMidPoint to TargetPoint) - 90.00) + 0.00) degrees)
Wait 1.00 seconds
Unit - Create 1 DummyUnit for (Owner of wallCaster) at wallPoint1 facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add WallOfFireFlameStrike to (Last created unit)
Unit - Set level of WallOfFireFlameStrike for (Last created unit) to (Level of Wall of Fire for wallCaster)
Unit - Order (Last created unit) to Human Blood Mage - Flame Strike wallPoint1
Wait 1.00 seconds
Unit - Create 1 DummyUnit for (Owner of wallCaster) at wallPoint2 facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add WallOfFireFlameStrike to (Last created unit)
Unit - Set level of WallOfFireFlameStrike for (Last created unit) to (Level of Wall of Fire for wallCaster)
Unit - Order (Last created unit) to Human Blood Mage - Flame Strike wallPoint2
Custom script: call RemoveLocation (udg_wallPoint1)
Custom script: call RemoveLocation (udg_wallPoint2)
Custom script: call RemoveLocation (udg_wallMidPoint)
Custom script: call RemoveLocation (udg_MidPoint)
Custom script: call RemoveLocation (udg_CasterPoint)
Custom script: call RemoveLocation (udg_TargetPoint)