- Joined
- Apr 22, 2008
- Messages
- 139
im trying to make a corpse explosion spell where the summoned dummies deal 6% damage to everything in an area on death. any ideas how?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Events:
Unit - A unit begins the effect of an ability
Conditions:
Ability being cast equal to Corpse Explosion Spell
Actions:
Unit Group - Pick every unit (within 300 of(target point of ability being cast)) matching condition (Matching unit is dead equal to true) and do actions:

Actions:


Special Effect - Create (explosion effect) at position of (picked unit)


Unit Group - Pick every unit (within 100 of(picked unit) matching condition (matching unit belongs to an enemy of (owner of(casting unit) and do actions:


Actions:



Unit - Cause (casting unit) to deal (life of(picked unit) x .06) damage to (picked unit) of attack type (spells) and damage type (spirit-link).


Unit - Remove (picked unit) from the game

Untitled Trigger 001

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Corpse Explosion

Actions


Custom script: local unit udg_temp_unit


Custom script: local group udg_temp_group


Custom script: local group udg_temp_group2


Custom script: local integer udg_index


For each (Integer index) from 0 to 2, do (Actions)



Loop - Actions




Set index = 0




Set temp_group = (Units within 400.00 of (Target point of ability being cast) matching (((Matching unit) is dead) Equal to True))




Set temp_unit = (Random unit from temp_group)




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






temp_unit Equal to No unit





Then - Actions






Set index = 2





Else - Actions






Special Effect - Create a special effect attached to the origin of temp_unit using SOME_SPECIAL_EFFECT






Set temp_group2 = (Units within 150.00 of (Position of temp_unit) matching ((((Triggering unit) is alive) Equal to True) and (((Triggering unit) has buff Liquid Fire) Equal to False)))






Unit Group - Pick every unit in temp_group2 and do (Actions)







Loop - Actions








Unit - Cause (Casting unit) to damage (Picked unit), dealing ((Max life of (Picked unit)) x 0.06) damage of attack type Chaos and damage type Spirit Link






Special Effect - Destroy (Last created special effect)






Unit - Remove temp_unit from the game






Wait 0.10 seconds


set udg_temp_unit = null


set udg_temp_group = null


set udg_temp_group2 = null
Set temp_group = (Units within 400.00 of (Target point of ability being cast) matching (((Matching unit) is dead) Equal to True))
set bj_wantDestroyGroup = true before using the group to prevent group leaks.
Actions:
Custom script: Set bj_wantDestroyGroup = true

