I made a spell that has a chance to drain life points from enemies! Sometimes when hero drains life points the game crush. Her is the Tigger i hope someone can help me.
-
BloodSuck chance
-
Events
-
Unit - A unit Learns a skill
-
-
Conditions
-
(learned Hero Skill) equal to BloodSuck
-
-
Actions
-
Set TRiggeringUnit[8] = (Triggering unit)
-
Set BloodSuckChance = (Random integer number between 1 and (14 - (Level of BloodSuck for TriggeringUnit[8]
-
Set BloodSuckPercentChance = 1
-
-
-
BloodSuck
-
Events
-
Unit -A unit is attacked
-
-
Conditions
-
((Attacked unit) is A structure) equal to false
-
((Attacked unit) belongs to an enemy of (owner of TriggeringUnit[8])) equal to true
-
((Attacked unit) is in (Units within 900.00 of (Position of TriggeringUnit[8]))) Equal to True
-
-
Actions
-
Set AttackedUnit [1] = (Attacked unit)
-
Set BloodSuckChance = (Random integer number between 1 and (14-(Level of BloodSuck for TriggeringUnit[8])))
-
If (ALL Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
BloodSuckChance Equal to BloodSuckPercentChance
-
-
Then - Actions
-
Unit - Add Sucklife effect to TriggeringUnit[8]
-
Unit - Set level of Sucklife effect for TriggeringUnit[8] to (Level of BLoodSuck for TriggeringUnit[8])
-
Unit - Order TriggeringUnit[8] to Neutral Dark Ranger - Life Drain AttackedUnit[1]
-
Wait 10.00 seconds
-
Unit - Remove Sucklife effect from TriggeringUnit[8]
-
-
Else - Actions
-
-
-
Last edited by a moderator: