Missile cast

Missile cast

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Missile

Actions


Set player_hero[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)


Set temploc3[(Player number of (Owner of (Triggering unit)))] = (Position of (Triggering unit))


Animation - Play (Triggering unit)'s attack animation


Animation - Queue (Triggering unit)'s stand animation


Special Effect - Create a special effect attached to the weapon of (Triggering unit) using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl


Special Effect - Destroy (Last created special effect)


Unit - Create 1 Missle for (Owner of (Triggering unit)) at temploc3[(Player number of (Owner of (Triggering unit)))] facing (Facing of (Triggering unit)) degrees


Unit - Turn collision for (Last created unit) Off


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


Unit Group - Add (Last created unit) to missle_unit[(Player number of (Owner of (Triggering unit)))]


Trigger - Turn on Missile Collision <gen>


Trigger - Turn on Missle Movement <gen>


Trigger - Turn on Missile DeathIDamage <gen>


Custom script: call RemoveLocation(udg_temploc)


Custom script: call RemoveLocation(udg_temploc3[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
Missile Collision

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


For each (Integer A) from 1 to 12, do (Actions)



Loop - Actions




Unit Group - Pick every unit in missle_unit[(Integer A)] and do (Actions)





Loop - Actions






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







If - Conditions








((Picked unit) is alive) Equal to True







Then - Actions








Set missle_collisionloc[(Integer A)] = (Position of (Picked unit))








Set missle_unitgroup[(Integer A)] = (Units within 130.00 of missle_collisionloc[(Integer A)])








Unit Group - Pick every unit in missle_unitgroup[(Integer A)] and do (Actions)









Loop - Actions










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











If - Conditions












Or - Any (Conditions) are true













Conditions














((Picked unit) is dead) Equal to True














((Picked unit) belongs to an ally of (Owner of (Random unit from missle_unit[(Integer A)]))) Equal to True











Then - Actions











Else - Actions












Unit Group - Pick every unit in missle_unit[(Integer A)] and do (Actions)













Loop - Actions














Unit - Make (Picked unit) Vulnerable












Unit Group - Pick every unit in missle_unitgroup[(Integer A)] and do (Actions)













Loop - Actions














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















If - Conditions
















Or - Any (Conditions) are true

















Conditions


















((Picked unit) is dead) Equal to True


















((Picked unit) belongs to an ally of (Owner of (Random unit from missle_unit[(Integer A)]))) Equal to True















Then - Actions















Else - Actions
















Unit Group - Pick every unit in missle_unit[(Integer A)] and do (Actions)

















Loop - Actions


















Unit - Cause (Picked unit) to damage circular area after 0.00 seconds of radius 100.00 at missle_collisionloc[(Integer A)], dealing 1.00 damage of attack type Spells and damage type Normal












Unit Group - Pick every unit in missle_unit[(Integer A)] and do (Actions)













Loop - Actions














Unit - Make (Picked unit) Invulnerable








Custom script: call RemoveLocation(udg_missle_collisionloc[GetForLoopIndexA()])








Custom script: call DestroyGroup(udg_missle_unitgroup[GetForLoopIndexA()])







Else - Actions
Missile DeathIDamage

Events


Unit - A unit Dies

Conditions


(Unit-type of (Dying unit)) Equal to Missle

Actions


Set temploc = (Position of (Dying unit))


Special Effect - Create a special effect at temploc using Objects\Spawnmodels\Other\NeutralBuildingExplosion\NeutralBuildingExplosion.mdl


Special Effect - Destroy (Last created special effect)


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



If - Conditions




(Level of Missile for player_hero[(Player number of (Owner of (Dying unit)))]) Equal to 1



Then - Actions




Unit - Cause (Dying unit) to damage circular area after 0.00 seconds of radius 200.00 at temploc, dealing 100.00 damage of attack type Spells and damage type Normal




Destructible - Pick every destructible within 200.00 of temploc and do (Actions)





Loop - Actions






Destructible - Kill (Picked destructible)



Else - Actions




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





If - Conditions






(Level of Missile for player_hero[(Player number of (Owner of (Dying unit)))]) Equal to 2





Then - Actions






Unit - Cause (Dying unit) to damage circular area after 0.00 seconds of radius 200.00 at temploc, dealing 200.00 damage of attack type Spells and damage type Normal






Destructible - Pick every destructible within 200.00 of temploc and do (Actions)







Loop - Actions








Destructible - Kill (Picked destructible)





Else - Actions






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







If - Conditions








(Level of Missile for player_hero[(Player number of (Owner of (Dying unit)))]) Equal to 3







Then - Actions








Unit - Cause (Dying unit) to damage circular area after 0.00 seconds of radius 200.00 at temploc, dealing 300.00 damage of attack type Spells and damage type Normal








Destructible - Pick every destructible within 200.00 of temploc and do (Actions)









Loop - Actions










Destructible - Kill (Picked destructible)







Else - Actions


Custom script: call RemoveLocation(udg_temploc)


Unit Group - Remove (Dying unit) from missle_unit[(Player number of (Owner of (Dying unit)))]


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



If - Conditions




(Number of units in missle_unit[(Player number of (Owner of (Dying unit)))]) Equal to 0



Then - Actions




Trigger - Turn off (This trigger)




Trigger - Turn off Missile Collision <gen>




Trigger - Turn off Missle Movement <gen>



Else - Actions
Missle Movement

Events


Time - Every 0.03 seconds of game time

Conditions

Actions


Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)



Loop - Actions




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





If - Conditions






(Unit-type of (Picked unit)) Equal to Missle






((Picked unit) is alive) Equal to True





Then - Actions






Set temploc1 = (Position of (Picked unit))






Set temploc2 = (temploc1 offset by 13.00 towards (Facing of (Picked unit)) degrees)






Unit - Move (Picked unit) instantly to temploc2






Custom script: call RemoveLocation(udg_temploc1)






Custom script: call RemoveLocation(udg_temploc2)





Else - Actions






Do nothing