So here is my Frozen Orb spell; it finally works - for player 1. Right now I have it set up so I would have to have the "Activation" trigger turn on one of twelve identical triggers based on what player cast the spell:
This activates when the spell is cast:
I am planning to convert the second "Effects" triggers to Jass and use local variables - do you see any leaks right now? I tried to save every unit, location, etc as a UDG in this spell so when I turn it into custom text I won't have leaks.
Is there a better way to make this MUI, besides having a "branching" thing in the first trigger that says something like:
If owner of casting unit = player 1, turn on trigger Effects 01
If owner of casting unit = player 2, turn on trigger Effects 02
If owner of casting unit = player 3, turn on trigger Effects 03
If owner of casting unit = player 4, turn on trigger Effects 04
... etc
This activates when the spell is cast:
-
Frozen Orb CAST
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Frozen Orb (Sorceress 1)
-
Actions
- Set FrozenOrbPlayer[(Player number of (Triggering player))] = (Triggering player)
- Set FrozenOrbLevel[(Player number of (Triggering player))] = (Level of (Ability being cast) for (Triggering unit))
- Set FrozenOrbCasterLoc[(Player number of (Triggering player))] = (Position of (Triggering unit))
- Set FrozenOrbTargetLoc[(Player number of (Triggering player))] = (Target point of ability being cast)
- Set FrozenOrbTravelAngle[(Player number of (Triggering player))] = (Angle from FrozenOrbCasterLoc[(Player number of (Triggering player))] to FrozenOrbTargetLoc[(Player number of (Triggering player))])
- Unit - Create 1 Dummy_FrozenOrb for (Triggering player) at FrozenOrbCasterLoc[(Player number of (Triggering player))] facing FrozenOrbTravelAngle[(Player number of (Triggering player))] degrees
- Set FrozenOrb[(Player number of (Triggering player))] = (Last created unit)
- Unit - Add a 3.01 second Generic expiration timer to FrozenOrb[(Player number of (Triggering player))]
- Set FrozenOrbBoltAngle[(Player number of (Triggering player))] = FrozenOrbTravelAngle[(Player number of (Triggering player))]
- Set FrozenOrbLoc[(Player number of (Triggering player))] = FrozenOrbCasterLoc[(Player number of (Triggering player))]
- Set FrozenOrbTime[(Player number of (Triggering player))] = 0.00
- Trigger - Turn on Frozen Orb EFFECTS 01 <gen>
-
Events
-
Frozen Orb EFFECTS 01
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- FrozenOrbTime[1] Less than or equal to 3.00
-
Then - Actions
- Set FrozenOrbLoc[1] = (FrozenOrbLoc[1] offset by 15.00 towards FrozenOrbTravelAngle[1] degrees)
- Set FrozenOrbBoltTargetLoc[1] = (FrozenOrbLoc[1] offset by (565.00 + (35.00 x (Real(FrozenOrbLevel[1])))) towards FrozenOrbBoltAngle[1] degrees)
- Unit - Move FrozenOrb[1] instantly to FrozenOrbLoc[1]
- Unit - Create 1 Dummy_Sorceress for Player 1 (Red) at FrozenOrbLoc[1] facing FrozenOrbBoltAngle[1] degrees
- Set FrozenOrbBoltCaster[1] = (Last created unit)
- Unit - Add a 0.25 second Generic expiration timer to FrozenOrbBoltCaster[1]
- Unit - Set level of Frozen Orb Bolt Visual (Dummy) for FrozenOrbBoltCaster[1] to 1
- Unit - Create 1 Dummy_FrozenOrb_Target for Player 1 (Red) at FrozenOrbBoltTargetLoc[1] facing FrozenOrbBoltAngle[1] degrees
- Set FrozenOrbBoltTarget[1] = (Last created unit)
- Unit - Add a 0.25 second Generic expiration timer to FrozenOrbBoltTarget[1]
- Unit - Order FrozenOrbBoltCaster[1] to Neutral - Firebolt FrozenOrbBoltTarget[1]
- Unit - Create 1 Dummy_Sorceress for Player 1 (Red) at FrozenOrbLoc[1] facing FrozenOrbBoltAngle[1] degrees
- Set FrozenOrbDamageCaster[1] = (Last created unit)
- Unit - Set level of Frozen Orb Damage (Dummy) for FrozenOrbDamageCaster[1] to FrozenOrbLevel[1]
- Unit - Hide FrozenOrbDamageCaster[1]
- Unit - Add a 0.25 second Generic expiration timer to FrozenOrbDamageCaster[1]
- Unit - Order FrozenOrbDamageCaster[1] to Undead Dreadlord - Carrion Swarm (FrozenOrbLoc[1] offset by 500.00 towards FrozenOrbBoltAngle[1] degrees)
- Set FrozenOrbBoltAngle[1] = (FrozenOrbBoltAngle[1] + 15.00)
- Set FrozenOrbTime[1] = (FrozenOrbTime[1] + 0.03)
-
Else - Actions
- Trigger - Turn off (This trigger)
- Set FrozenOrbTime[1] = 0.00
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
I am planning to convert the second "Effects" triggers to Jass and use local variables - do you see any leaks right now? I tried to save every unit, location, etc as a UDG in this spell so when I turn it into custom text I won't have leaks.
Is there a better way to make this MUI, besides having a "branching" thing in the first trigger that says something like:
If owner of casting unit = player 1, turn on trigger Effects 01
If owner of casting unit = player 2, turn on trigger Effects 02
If owner of casting unit = player 3, turn on trigger Effects 03
If owner of casting unit = player 4, turn on trigger Effects 04
... etc