- Joined
- Jun 25, 2008
- Messages
- 1,043
-
Initialization
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Magic Missile
-
Actions
- Set MM_PlayerNumber = (Player number of (Owner of (Casting unit)))
- Set MM_Caster[MM_PlayerNumber] = (Casting unit)
- Set MM_TempPoint[1] = (Position of (Casting unit))
- Set MM_TempPoint[2] = (Position of (Target unit of ability being cast))
- Set MM_TempPoint[3] = (MM_TempPoint[1] offset by 5.00 towards (Angle from MM_TempPoint[1] to MM_TempPoint[2]) degrees)
- Unit - Create 1 Magic Missile dummy for Player 1 (Red) at MM_TempPoint[3] facing (Distance between MM_TempPoint[1] and MM_TempPoint[2]) degrees
- Set MM_Missile[MM_PlayerNumber] = (Last created unit)
- Unit Group - Add MM_Missile[MM_PlayerNumber] to MM_ActiveMissiles
- Custom script: call RemoveLocation(udg_MM_TempPoint[1])
- Custom script: call RemoveLocation(udg_MM_TempPoint[2])
- Custom script: call RemoveLocation(udg_MM_TempPoint[3])
-
Events
-
Movement
-
Events
- Time - Every 0.20 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in MM_ActiveMissiles and do (Actions)
-
Loop - Actions
- Set MM_TempPoint[1] = (Position of (Picked unit))
- Set MM_TempPoint[2] = (MM_TempPoint[1] offset by 30.00 towards (Facing of (Picked unit)) degrees)
- Set MM_MissileTargets = (Units within 50.00 of (Position of MM_Missile[MM_PlayerNumber]))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (MM_Missile[MM_PlayerNumber] is alive) Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Terrain pathing at MM_TempPoint[2] of type Walkability is off) Equal to False
-
Then - Actions
- Unit - Move MM_Missile[MM_PlayerNumber] instantly to MM_TempPoint[2]
- Unit - Kill MM_Missile[MM_PlayerNumber]
- Unit Group - Remove MM_Missile[MM_PlayerNumber] from MM_ActiveMissiles
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in MM_MissileTargets) Greater than or equal to 1
-
Then - Actions
-
Unit Group - Pick every unit in MM_MissileTargets and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) belongs to an enemy of (Owner of MM_Caster[MM_PlayerNumber])) Equal to True
-
Then - Actions
- Unit - Cause MM_Caster[MM_PlayerNumber] to damage (Picked unit), dealing 50.00 damage of attack type Spells and damage type Magic
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Set MM_TempPoint[3] = (Position of MM_Missile[MM_PlayerNumber])
- Special Effect - Create a special effect at MM_TempPoint[3] using Abilities\Spells\Items\AIil\AIilTarget.mdl
- Special Effect - Destroy (Last created special effect)
-
Unit Group - Pick every unit in MM_MissileTargets and do (Actions)
-
Else - Actions
- Set MM_TempPoint[3] = (Position of MM_Missile[MM_PlayerNumber])
- Special Effect - Create a special effect at MM_TempPoint[3] using Abilities\Spells\Items\AIil\AIilTarget.mdl
- Special Effect - Destroy (Last created special effect)
-
If - Conditions
-
Else - Actions
- Unit - Kill MM_Missile[MM_PlayerNumber]
- Unit Group - Remove MM_Missile[MM_PlayerNumber] from MM_ActiveMissiles
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in MM_MissileTargets) Greater than or equal to 1
-
Then - Actions
-
Unit Group - Pick every unit in MM_MissileTargets and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) belongs to an enemy of (Owner of MM_Caster[MM_PlayerNumber])) Equal to True
-
Then - Actions
- Unit - Cause MM_Caster[MM_PlayerNumber] to damage (Picked unit), dealing 50.00 damage of attack type Spells and damage type Magic
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Set MM_TempPoint[3] = (Position of MM_Missile[MM_PlayerNumber])
- Special Effect - Create a special effect at MM_TempPoint[3] using Abilities\Spells\Items\AIil\AIilTarget.mdl
- Special Effect - Destroy (Last created special effect)
-
Unit Group - Pick every unit in MM_MissileTargets and do (Actions)
-
Else - Actions
- Set MM_TempPoint[3] = (Position of MM_Missile[MM_PlayerNumber])
- Special Effect - Create a special effect at MM_TempPoint[3] using Abilities\Spells\Items\AIil\AIilTarget.mdl
- Special Effect - Destroy (Last created special effect)
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Set MM_Caster[MM_PlayerNumber] = No unit
- Set MM_Missile[MM_PlayerNumber] = No unit
- Custom script: call RemoveLocation(udg_MM_TempPoint[1])
- Custom script: call RemoveLocation(udg_MM_TempPoint[2])
- Custom script: call RemoveLocation(udg_MM_TempPoint[3])
- Custom script: call DestroyGroup(udg_MM_MissileTargets)
- Trigger - Turn off (This trigger)
-
If - Conditions
- Set MM_Caster[MM_PlayerNumber] = No unit
- Set MM_Missile[MM_PlayerNumber] = No unit
- Custom script: call RemoveLocation(udg_MM_TempPoint[1])
- Custom script: call RemoveLocation(udg_MM_TempPoint[2])
- Custom script: call RemoveLocation(udg_MM_TempPoint[3])
- Custom script: call DestroyGroup(udg_MM_MissileTargets)
-
Loop - Actions
-
Unit Group - Pick every unit in MM_ActiveMissiles and do (Actions)
-
Events
Hai. Where did I go wrong?
It just does nothing at all.