- Joined
- Aug 5, 2010
- Messages
- 147
Made an item that has a 20% chance to cast Forked Lightning when the hero damages a unit. Only problem is the bolt of lightning doesnt appear.
Here is the trigger. I orginally used remove (last created unit) and i assumed that was causing the problem but after replacing it with an expiration timer the problem still occurs.
Here is the trigger. I orginally used remove (last created unit) and i assumed that was causing the problem but after replacing it with an expiration timer the problem still occurs.
-
Lightning Sword
-
Events
-
Game - DamageEvent becomes Equal to 1.00
-
-
Conditions
-
(DamageEventSource is A Hero) Equal to True
-
(DamageEventSource has an item of type Lightning Sword) Equal to True
-
-
Actions
-
Set OrbSword_Chance[(Player number of (Owner of DamageEventSource))] = (Random integer number between 1 and 100)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
OrbSword_Chance[(Player number of (Owner of DamageEventSource))] Less than or equal to 20
-
-
Then - Actions
-
Set OrbPlayer_Number = (Player number of (Owner of DamageEventSource))
-
Set OrbSword_Points[(Player number of (Owner of DamageEventSource))] = (Position of DamageEventSource)
-
Unit - Create 1 Dummy for (Owner of DamageEventSource) at OrbSword_Points[(Player number of (Owner of DamageEventSource))] facing Default building facing degrees
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Unit - Add Orb - Forked Lightning [Lightning Sword] to (Last created unit)
-
Unit - Order (Last created unit) to Neutral Naga Sea Witch - Forked Lightning DamageEventTarget
-
Custom script: call RemoveLocation(udg_OrbSword_Points[udg_OrbPlayer_Number])
-
-
Else - Actions
-
-
-