Moderator
M
Moderator
22:27, 12th Sep 2010
The_Reborn_Devil:
The triggering looks good.
Status: Approved
Rating: Useful
The_Reborn_Devil:
The triggering looks good.
Status: Approved
Rating: Useful
Events

Unit - A unit Starts the effect of an ability
Conditions

(Ability being cast) Equal to Trail of Trees

((Triggering unit) has buff Trail of Trees ) Equal to False

((Triggering unit) is in TOT_CastingGroup) Equal to False
Actions

Unit Group - Add (Triggering unit) to TOT_CastingGroup

Set TOT_CasterNumber = (TOT_CasterNumber + 1)

Set TOT_CastNumber = (TOT_CastNumber + 1)

-------- SETTINGS --------

-------- --------

-------- Sets wether trees fall or get removed --------

Set TOT_TreeFall = False

-------- Sets wether trees remain or die. --------

Set TOT_TreeDeath = True

-------- Sets the duration of the green orbs --------

Set TOT_OrbDuration = 0.99

-------- Sets the duration of the trees --------

Set TOT_TreeDuration = (20 + (Integer(TOT_OrbDuration)))

-------- Sets the duration of spell/Max number of trees spawned --------

-------- Should be same as spell duration in object editor --------

Set TOT_MaxTrees = 20

-------- --------

-------- SETTINGS END --------

Set TOT_Caster[TOT_CasterNumber] = (Triggering unit)

Set TOT_Boolean[TOT_CasterNumber] = True

Trigger - Turn on TOT Loop <gen>
Events

Time - Every 1.00 seconds of game time
Conditions
Actions

For each (Integer TOT_Integer) from 1 to TOT_CasterNumber, do (Actions)


Loop - Actions



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




If - Conditions





TOT_CastNumber Greater than 0




Then - Actions





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






If - Conditions







(TOT_Caster[TOT_Integer] has buff Trail of Trees ) Equal to True







(TOT_Caster[TOT_Integer] is alive) Equal to True






Then - Actions







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








If - Conditions









TOT_Boolean[TOT_Integer] Equal to True








Then - Actions









Set TOT_Point[1] = (Position of TOT_Caster[TOT_Integer])









Unit - Create 1 Dummy for tree for (Owner of TOT_Caster[TOT_Integer]) at TOT_Point[1] facing Default building facing degrees









Unit - Add a TOT_OrbDuration second Generic expiration timer to (Last created unit)









Unit - Create 1 Tree TIMER for (Owner of TOT_Caster[TOT_Integer]) at TOT_Point[1] facing Default building facing degrees









Unit - Add a (Real(TOT_TreeDuration)) second Generic expiration timer to (Last created unit)









Custom script: call RemoveLocation(udg_TOT_Point[1])









Set TOT_TreeCount[TOT_Integer] = (TOT_TreeCount[TOT_Integer] + 1)









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










If - Conditions











TOT_TreeCount[TOT_Integer] Equal to TOT_MaxTrees










Then - Actions











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












If - Conditions













(TOT_Caster[TOT_Integer] is in TOT_CastingGroup) Equal to True












Then - Actions













Set TOT_Boolean[TOT_Integer] = False













Set TOT_CastNumber = (TOT_CastNumber - 1)













Unit Group - Remove TOT_Caster[TOT_Integer] from TOT_CastingGroup












Else - Actions










Else - Actions








Else - Actions






Else - Actions







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








If - Conditions









(TOT_Caster[TOT_Integer] is in TOT_CastingGroup) Equal to True








Then - Actions









Set TOT_Boolean[TOT_Integer] = False









Set TOT_CastNumber = (TOT_CastNumber - 1)









Unit Group - Remove TOT_Caster[TOT_Integer] from TOT_CastingGroup








Else - Actions




Else - Actions





Set TOT_CasterNumber = 0





Trigger - Turn off (This trigger)
Events

Unit - A unit Dies
Conditions
Actions

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


If - Conditions



(Unit-type of (Triggering unit)) Equal to Dummy for tree


Then - Actions



Set TOT_Point[2] = (Position of (Triggering unit))



Special Effect - Create a special effect at TOT_Point[2] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl



Special Effect - Destroy (Last created special effect)



Destructible - Create a Summoned Tree at TOT_Point[2] facing (Random angle) with scale 1.00 and variation 0



Custom script: call RemoveLocation(udg_TOT_Point[2])


Else - Actions

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


If - Conditions



TOT_TreeDeath Equal to True



(Unit-type of (Triggering unit)) Equal to Tree TIMER


Then - Actions



Set TOT_Point[99] = (Position of (Triggering unit))



Custom script: set bj_wantDestroyGroup = true



Destructible - Pick every destructible within 100.00 of TOT_Point[99] and do (Actions)




Loop - Actions





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






If - Conditions







(Destructible-type of (Picked destructible)) Equal to Summoned Tree






Then - Actions







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








If - Conditions









TOT_TreeFall Equal to False








Then - Actions









Destructible - Remove (Picked destructible)








Else - Actions









Destructible - Kill (Picked destructible)






Else - Actions







Custom script: call RemoveLocation(udg_TOT_Point[99])


Else - Actions