- Joined
- Feb 25, 2009
- Messages
- 2,004
I've been trying to discover the matter of this thing but I couldn't find any reference why it occurs.
It appears that the spells in my map works only for player 1 (red) and never for any other player.
Here are the triggers of both spells:
"AbilityStat" variables are used for upgrades and varry based on the level of each upgrade.
Their values goes from 2000 to 3000 for Elune's Arrow and 650 to 800 for Leap.
All suggestions are acceptable.
It appears that the spells in my map works only for player 1 (red) and never for any other player.
Here are the triggers of both spells:
-
EA Start
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Elune's Arrow
-
Actions
- Set EA_Caster[EA_MUI1] = (Triggering unit)
- Set EA_Loc1[EA_MUI1] = (Position of (Triggering unit))
- Set EA_Loc2 = (Target point of ability being cast)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Triggering unit) has buff Damage (buff)) Equal to True
-
Then - Actions
- Set EA_Damage[EA_MUI1] = (AbilityStat1[(Player number of (Owner of (Triggering unit)))] x 2.00)
-
Else - Actions
- Set EA_Damage[EA_MUI1] = AbilityStat1[(Player number of (Owner of (Triggering unit)))]
-
If - Conditions
- Set EA_Range[EA_MUI1] = AbilityStat2[(Player number of (Owner of (Triggering unit)))]
- Set EA_Speed[EA_MUI1] = AbilityStat3[(Player number of (Owner of (Triggering unit)))]
- Set EA_Distance[EA_MUI1] = 0.00
- Set EA_Timers[EA_MUI1] = 0.00
- Set EA_TimerLevel[EA_MUI2] = 0
- Unit - Create 1 Projectile Dummy for (Owner of (Triggering unit)) at EA_Loc1[EA_MUI1] facing EA_Loc2
- Set EA_Dummy[EA_MUI1] = (Last created unit)
- Special Effect - Create a special effect attached to the origin of (Last created unit) using war3mapImported\s_Enchanted Arrow.mdx
- Set EA_ProjectileModel[EA_MUI1] = (Last created special effect)
- Animation - Change (Last created unit) flying height to 50.00 at 0.00
- Animation - Change (Last created unit)'s size to (125.00%, 125.00%, 125.00%) of its original size
- Custom script: call RemoveLocation (udg_EA_Loc1[udg_EA_MUI1])
- Custom script: call RemoveLocation (udg_EA_Loc2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EA_MUI1 Equal to 0
-
Then - Actions
- Trigger - Turn on EA Loop <gen>
- Else - Actions
-
If - Conditions
- Set EA_MUI1 = (EA_MUI1 + 1)
-
Events
-
EA Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer EA_MUI2) from 0 to (EA_MUI1 - 1), do (Actions)
-
Loop - Actions
- Custom script: set udg_X = GetUnitX(udg_EA_Dummy[udg_EA_MUI2])
- Custom script: set udg_Y = GetUnitY(udg_EA_Dummy[udg_EA_MUI2])
- Custom script: call SetUnitX( udg_EA_Dummy[udg_EA_MUI2] , udg_X + udg_EA_Speed[udg_EA_MUI2] * Cos( GetUnitFacing( udg_EA_Dummy[udg_EA_MUI2] ) * 0.017453292 ) )
- Custom script: call SetUnitY( udg_EA_Dummy[udg_EA_MUI2] , udg_Y + udg_EA_Speed[udg_EA_MUI2] * Sin( GetUnitFacing( udg_EA_Dummy[udg_EA_MUI2] ) * 0.017453292 ) )
- Set EA_Loc1[EA_MUI2] = (Position of EA_Dummy[EA_MUI2])
- Set EA_Distance[EA_MUI2] = (EA_Distance[EA_MUI2] + EA_Speed[EA_MUI2])
- Set EA_Timers[EA_MUI2] = (EA_Timers[EA_MUI2] + 4.13)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EA_Timers[EA_MUI2] Greater than or equal to 33.00
-
Then - Actions
- Set EA_TimerLevel[EA_MUI2] = (EA_TimerLevel[EA_MUI2] + 1)
- Set EA_Timers[EA_MUI2] = 0.00
- Else - Actions
-
If - Conditions
- Set EA_Targets = (Units within 100.00 of EA_Loc1[EA_MUI2] matching ((((Matching unit) is A Hero) Equal to True) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of EA_Dummy[EA_MUI2])) Equal to True))))
- Custom script: set udg_EA_Main = FirstOfGroup(udg_EA_Targets)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- ((Playable map area) contains EA_Dummy[EA_MUI2]) Equal to False
- EA_Distance[EA_MUI2] Greater than or equal to EA_Range[EA_MUI2]
- EA_Main Not equal to No unit
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Set EA_MUI1 = (EA_MUI1 - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EA_MUI1 Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Unit - Create 1 Caster Dummy for (Owner of EA_Caster[EA_MUI2]) at EA_Loc1[EA_MUI2] facing Default building facing degrees
- Unit - Add Stun to (Last created unit)
- Unit - Set level of Stun for (Last created unit) to EA_TimerLevel[EA_MUI2]
- Unit - Order (Last created unit) to Human Mountain King - Storm Bolt EA_Main
- Unit - Cause EA_Dummy[EA_MUI2] to damage EA_Main, dealing EA_Damage[EA_MUI2] damage of attack type Spells and damage type Magic
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- EA_Distance[EA_MUI2] Greater than Player_Longest_Shot[(Player number of (Owner of EA_Caster[EA_MUI2]))]
-
Then - Actions
- Set Player_Longest_Shot[(Player number of (Owner of EA_Caster[EA_MUI2]))] = EA_Distance[EA_MUI2]
- Else - Actions
-
If - Conditions
- Custom script: call RemoveLocation (udg_EA_Loc1[udg_EA_MUI2])
- Set EA_Loc1[EA_MUI2] = EA_Loc1[EA_MUI1]
- Custom script: set udg_EA_Caster[udg_EA_MUI2] = null
- Set EA_Caster[EA_MUI2] = EA_Caster[EA_MUI1]
- Special Effect - Destroy EA_ProjectileModel[EA_MUI2]
- Set EA_ProjectileModel[EA_MUI2] = EA_ProjectileModel[EA_MUI1]
- Unit - Kill EA_Dummy[EA_MUI2]
- Custom script: set udg_EA_Dummy[udg_EA_MUI2] = null
- Set EA_Dummy[EA_MUI2] = EA_Dummy[EA_MUI1]
- Set EA_Distance[EA_MUI2] = EA_Distance[EA_MUI1]
- Set EA_Range[EA_MUI2] = EA_Range[EA_MUI1]
- Set EA_Speed[EA_MUI2] = EA_Speed[EA_MUI1]
- Set EA_Timers[EA_MUI2] = EA_Timers[EA_MUI1]
- Set EA_TimerLevel[EA_MUI2] = EA_TimerLevel[EA_MUI1]
- Set EA_MUI2 = (EA_MUI2 - 1)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer EA_MUI2) from 0 to (EA_MUI1 - 1), do (Actions)
-
Events
-
LP Start
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Leap
-
Actions
- Set LP_Caster[LP_MUI1] = (Triggering unit)
- Set LP_Angle[LP_MUI1] = (Facing of LP_Caster[LP_MUI1])
- Set LP_MaxDistance[LP_MUI1] = AbilityStat4[(Player number of (Owner of (Triggering unit)))]
- Set LP_Height[LP_MUI1] = 250.00
- Set LP_Distance[LP_MUI1] = 0.00
- Set LP_Speed[LP_MUI1] = AbilityStat5[(Player number of (Owner of (Triggering unit)))]
- Animation - Change LP_Caster[LP_MUI1] turn speed to 0.00
- Unit - Add Fly Trick to LP_Caster[LP_MUI1]
- Unit - Remove Fly Trick from LP_Caster[LP_MUI1]
- Unit - Turn collision for LP_Caster[LP_MUI1] Off
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LP_MUI1 Equal to 0
-
Then - Actions
- Trigger - Turn on LP Move <gen>
- Else - Actions
-
If - Conditions
- Set LP_MUI1 = (LP_MUI1 + 1)
-
Events
-
LP Move
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer LP_MUI2) from 0 to (LP_MUI1 - 1), do (Actions)
-
Loop - Actions
- Custom script: set udg_X = GetUnitX(udg_LP_Caster[udg_LP_MUI2])
- Custom script: set udg_Y = GetUnitY(udg_LP_Caster[udg_LP_MUI2])
- Set LP_CasterLoc[LP_MUI2] = (Position of LP_Caster[LP_MUI2])
- Set Parabola = (((2.00 x LP_Height[LP_MUI2]) / LP_MaxDistance[LP_MUI2]) x ((LP_MaxDistance[LP_MUI2] - LP_Distance[LP_MUI2]) x (LP_Distance[LP_MUI2] / LP_MaxDistance[LP_MUI2])))
- Custom script: call SetUnitX( udg_LP_Caster[udg_LP_MUI2] , udg_X + udg_LP_Speed[udg_LP_MUI2] * Cos( GetUnitFacing( udg_LP_Caster[udg_LP_MUI2] ) * 0.017453292 ) )
- Custom script: call SetUnitY( udg_LP_Caster[udg_LP_MUI2] , udg_Y + udg_LP_Speed[udg_LP_MUI2] * Sin( GetUnitFacing( udg_LP_Caster[udg_LP_MUI2] ) * 0.017453292 ) )
- Animation - Change LP_Caster[LP_MUI2] flying height to Parabola at 0.00
- Unit - Make LP_Caster[LP_MUI2] face LP_Angle[LP_MUI2] over 0.00 seconds
- Animation - Play LP_Caster[LP_MUI2]'s walk animation
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
- ((Playable map area) contains LP_Caster[LP_MUI2]) Equal to False
- (LP_Caster[LP_MUI2] has buff Ensare (Ground 2)) Equal to True
-
Conditions
-
Or - Any (Conditions) are true
-
Then - Actions
- Unit - Move LP_Caster[LP_MUI2] instantly to LP_CasterLoc[LP_MUI2]
- Else - Actions
-
If - Conditions
- Set LP_Distance[LP_MUI2] = (LP_Distance[LP_MUI2] + LP_Speed[LP_MUI2])
- Custom script: call RemoveLocation (udg_LP_CasterLoc[udg_LP_MUI2])
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LP_Distance[LP_MUI2] Greater than or equal to LP_MaxDistance[LP_MUI2]
-
Then - Actions
- Set LP_MUI1 = (LP_MUI1 - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LP_MUI1 Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
- Unit - Turn collision for LP_Caster[LP_MUI2] On
- Set Temp_Loc4 = (Position of LP_Caster[LP_MUI2])
- Unit - Create 1 Caster Dummy for (Owner of LP_Caster[LP_MUI2]) at Temp_Loc4 facing Default building facing degrees
- Unit - Add Speed (skill) to (Last created unit)
- Unit - Order (Last created unit) to Orc Shaman - Bloodlust LP_Caster[LP_MUI2]
- Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
- Animation - Change LP_Caster[LP_MUI2] turn speed to (Default turn speed of LP_Caster[LP_MUI2])
- Animation - Change LP_Caster[LP_MUI2] flying height to 0.00 at 0.00
- Unit - Order LP_Caster[LP_MUI2] to Stop
- Set LP_Caster[LP_MUI2] = No unit
- Set LP_Caster[LP_MUI2] = LP_Caster[LP_MUI1]
- Set LP_Distance[LP_MUI2] = LP_Distance[LP_MUI1]
- Set LP_MaxDistance[LP_MUI2] = LP_MaxDistance[LP_MUI1]
- Set LP_MUI2 = (LP_MUI2 - 1)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
For each (Integer LP_MUI2) from 0 to (LP_MUI1 - 1), do (Actions)
-
Events
"AbilityStat" variables are used for upgrades and varry based on the level of each upgrade.
Their values goes from 2000 to 3000 for Elune's Arrow and 650 to 800 for Leap.
All suggestions are acceptable.