- Joined
- Jun 26, 2014
- Messages
- 513
Hello, here's what the spell is: Throw weapon in a line, deal damage to first enemy hit and slow it. Destroy projectile after contact.
It worked perfectly fine and out of the nowhere it stopped working.
Now here's the following bugs:
-When it hits a unit and it doesn't kill it it works fine, but when the unit dies, the projectile continues to fly until it hits something again (or expires).
How do I fix this?
P.S: If I try to kill the projectile first before the damage is dealt, no damage is dealt at all nor does the slow work, but the special effects still work. (No idea why this happens)
It worked perfectly fine and out of the nowhere it stopped working.
Now here's the following bugs:
-When it hits a unit and it doesn't kill it it works fine, but when the unit dies, the projectile continues to fly until it hits something again (or expires).
How do I fix this?
P.S: If I try to kill the projectile first before the damage is dealt, no damage is dealt at all nor does the slow work, but the special effects still work. (No idea why this happens)
-
Cleaver
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Cleaver
-
-
Actions
-
Set spCleaverIndex = (spCleaverIndex + 1)
-
Set spCleaverMui = (spCleaverMui + 1)
-
Set spCleaverCaster[spCleaverMui] = (Triggering unit)
-
Set tempPoint[0] = (Position of (Triggering unit))
-
Set tempPoint[1] = (Target point of ability being cast)
-
Unit - Create 1 Cleaver for (Owner of (Triggering unit)) at tempPoint[0] facing tempPoint[1]
-
Unit - Add a 0.75 second Generic expiration timer to (Last created unit)
-
Set spCleaverDummy[spCleaverMui] = (Last created unit)
-
Custom script: call RemoveLocation(udg_tempPoint[0])
-
Custom script: call RemoveLocation(udg_tempPoint[1])
-
Trigger - Turn on Cleaver Loop <gen>
-
-
-
Cleaver Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer A) from 1 to spCleaverMui, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(spCleaverDummy[(Integer A)] is alive) Equal to True
-
-
Then - Actions
-
Set tempPoint[0] = (Position of spCleaverDummy[(Integer A)])
-
Set tempPoint[1] = (tempPoint[0] offset by 35.00 towards (Facing of spCleaverDummy[(Integer A)]) degrees)
-
Unit - Move spCleaverDummy[(Integer A)] instantly to tempPoint[1]
-
Set tempGroup[0] = (Units within 100.00 of tempPoint[0] matching ((((Matching unit) belongs to an enemy of (Owner of spCleaverCaster[(Integer A)])) Equal to True) and (((Matching unit) is alive) Equal to True)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in tempGroup[0]) Greater than 0
-
-
Then - Actions
-
Unit Group - Pick every unit in tempGroup[0] and do (Actions)
-
Loop - Actions
-
Set tempPoint[2] = (Position of (Picked unit))
-
Unit - Create 1 Cleaver (Slow) for (Owner of spCleaverCaster[(Integer A)]) at tempPoint[2] facing Default building facing degrees
-
Unit - Add a 0.30 second Generic expiration timer to (Last created unit)
-
Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
-
Unit - Cause spCleaverCaster[(Integer A)] to damage (Picked unit), dealing ((30.00 + (50.00 x (Real((Level of Cleaver for spCleaverCaster[(Integer A)]))))) + (1.70 x (Real((Strength of spCleaverCaster[(Integer A)] (Include bonuses)))))) damage of attack type Hero and damage type Normal
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\GlaiveMissile\GlaiveMissileTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
Unit - Kill spCleaverDummy[(Integer A)]
-
Custom script: call RemoveLocation(udg_tempPoint[2])
-
-
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_tempPoint[0])
-
Custom script: call RemoveLocation(udg_tempPoint[1])
-
Custom script: call DestroyGroup(udg_tempGroup[0])
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
spCleaverDummy[(Integer A)] Not equal to No unit
-
-
Then - Actions
-
Set spCleaverDummy[(Integer A)] = No unit
-
Set spCleaverIndex = (spCleaverIndex - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
spCleaverIndex Less than or equal to 0
-
-
Then - Actions
-
Set spCleaverIndex = 0
-
Set spCleaverMui = 0
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
-
-
-
-
-
-