Issuing a dummy unit to cast a spell on a target or a new unit to a point not working

Status
Not open for further replies.
Level 11
Joined
Jul 25, 2005
Messages
573
I've been using this alot with most of my dummy spells for my map but all of a sudden while using it for a boss the dummies are not following the order from the trigger =/

Some spawns that come during the boss are ordered to patrol to the center of his room, they are ignoring that and just standing where they spawn.

And some dummy units for triggered spells the boss casts are not casting their spells (I used a display msg in game to debug it to see if that portion of that trigger even works and it does) the exact same triggering method is used also on the boss for a simple AoE in which a dummy is issued an order with no target, and that dummy follows the trigger, while anything else in this trigger that orders a unit to a point or to cast something on a unit does not work.

Why would this suddenly happen with the boss? The player triggered spells that have dummies issued to cast on units still works, just for the boss it suddenly won't work =/


If need be I'll post the trigger data.


Edit: Ok just an update the spawns started listening to their part of the trigger =/ though the dummies that are ordered to cast a spell via trigger on a single target are still ignoring it.
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
Maybe the spell cannot be cast on the specified boss, I mean, did you check the "allowed" unit-types?
So if the boss is, lets say "Ancient" the spell might not support this classification, so that will be the problem.

Or maybe, you are giving the wrong order to the dummy.

Else, post triggers, so someone can check it for errors.

By the way, check if the spell(s) require mana to be cast and then check if the dummy has any mana points...
 
Level 11
Joined
Jul 25, 2005
Messages
573
Maybe the spell cannot be cast on the specified boss, I mean, did you check the "allowed" unit-types?
So if the boss is, lets say "Ancient" the spell might not support this classification, so that will be the problem.
Checked, all requirements are met for the spell to be cast on the boss and/or the players.

Or maybe, you are giving the wrong order to the dummy.

I'm ordering them to cast the correct spell that the dummy spell is based off of, so unless the dummies are being weird about it this shouldn't be the case.

By the way, check if the spell(s) require mana to be cast and then check if the dummy has any mana points...

Made sure all the dummy spells did not cast mana prior to testing.




Here are the triggers, no need to read the reset procedure at the bottom. The only sections that aren't working are the skills "Unholy Blade", "Bone Prison" and "Bone Spike".

The skeleton spawns are patrolling correctly now and the spell "Terror" works properly.

  • Leoric Triggers Active
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set Leoric_Time = (Leoric_Time + 1)
      • Set Leoric_EnemiesDetected = (Number of units in (Units in LeoricChamber <gen> matching ((((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True) and (((Matching unit) is alive) Equal to True))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Leoric_EnemiesDetected Greater than 0
        • Then - Actions
          • -------- Start Alternate Phase A --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Integer((Percentage life of Skeleton King Leoric 0038 <gen>))) Less than 15
              • Leoric_Phase Equal to 1
            • Then - Actions
              • Set Leoric_TrackPhase = 2
              • Set Leoric_Phase = 5
              • Set Leoric_Time = 0
              • Countdown Timer - Create a timer window for Leoric_AltPhaseTimer with title Phase 2 in
              • Set Leoric_AltPhaseTimerWindow = (Last created timer window)
              • Countdown Timer - Start Leoric_AltPhaseTimer as a One-shot timer that will expire in 50.00 seconds
              • Special Effect - Create a special effect at (Position of Skeleton King Leoric 0038 <gen>) using war3mapImported\WarpDarkCaster.mdx
              • Unit - Move Skeleton King Leoric 0038 <gen> instantly to (Center of Leoric Platform <gen>), facing 270.00 degrees
              • Unit - Set life of Skeleton King Leoric 0038 <gen> to 50.00%
              • Special Effect - Create a special effect at (Position of Skeleton King Leoric 0038 <gen>) using war3mapImported\WarpDarkTarget.mdx
              • Unit - Pause Skeleton King Leoric 0038 <gen>
              • Unit - Make Skeleton King Leoric 0038 <gen> Invulnerable
              • Animation - Play Skeleton King Leoric 0038 <gen>'s channel loop animation
              • Game - Display to (All players) the text: |cffff0000[Alternat...
            • Else - Actions
          • -------- Start Alternate Phase B --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Integer((Percentage life of Skeleton King Leoric 0038 <gen>))) Less than 15
              • Leoric_Phase Equal to 2
            • Then - Actions
              • Set Leoric_TrackPhase = 3
              • Set Leoric_Phase = 5
              • Set Leoric_Time = 0
              • Countdown Timer - Create a timer window for Leoric_AltPhaseTimer with title Phase 3 in
              • Set Leoric_AltPhaseTimerWindow = (Last created timer window)
              • Countdown Timer - Start Leoric_AltPhaseTimer as a One-shot timer that will expire in 50.00 seconds
              • Special Effect - Create a special effect at (Position of Skeleton King Leoric 0038 <gen>) using war3mapImported\WarpDarkCaster.mdx
              • Unit - Move Skeleton King Leoric 0038 <gen> instantly to (Center of Leoric Platform <gen>), facing 270.00 degrees
              • Unit - Set life of Skeleton King Leoric 0038 <gen> to 50.00%
              • Special Effect - Create a special effect at (Position of Skeleton King Leoric 0038 <gen>) using war3mapImported\WarpDarkTarget.mdx
              • Unit - Pause Skeleton King Leoric 0038 <gen>
              • Unit - Make Skeleton King Leoric 0038 <gen> Invulnerable
              • Animation - Play Skeleton King Leoric 0038 <gen>'s channel loop animation
              • Game - Display to (All players) the text: |cffff0000[Alternat...
            • Else - Actions
          • -------- Alternate Phase Triggers --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Leoric_Phase Equal to 5
            • Then - Actions
              • -------- Spawn Initial Skeletons in Alternate Phase --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Leoric_Time Less than or equal to 10
                • Then - Actions
                  • Set Integer = (Random integer number between 1 and 4)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Integer Equal to 1
                    • Then - Actions
                      • Unit - Create 1 Skeleton Minion for Player 12 (Brown) at (Center of Leoric Spawn 1 <gen>) facing Default building facing degrees
                      • Unit - Order (Last created unit) to Patrol To (Random point in LeoricCamBounds <gen>)
                      • Unit - Add a 90.00 second Generic expiration timer to (Last created unit)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Integer Equal to 2
                    • Then - Actions
                      • Unit - Create 1 Skeleton Minion for Player 12 (Brown) at (Center of Leoric Spawn 2 <gen>) facing Default building facing degrees
                      • Unit - Order (Last created unit) to Patrol To (Random point in LeoricCamBounds <gen>)
                      • Unit - Add a 90.00 second Generic expiration timer to (Last created unit)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Integer Equal to 3
                    • Then - Actions
                      • Unit - Create 1 Skeleton Minion for Player 12 (Brown) at (Center of Leoric Spawn 3 <gen>) facing Default building facing degrees
                      • Unit - Order (Last created unit) to Patrol To (Random point in LeoricCamBounds <gen>)
                      • Unit - Add a 90.00 second Generic expiration timer to (Last created unit)
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Integer Equal to 4
                    • Then - Actions
                      • Unit - Create 1 Skeleton Minion for Player 12 (Brown) at (Center of Leoric Spawn 4 <gen>) facing Default building facing degrees
                      • Unit - Order (Last created unit) to Patrol To (Random point in LeoricCamBounds <gen>)
                      • Unit - Add a 90.00 second Generic expiration timer to (Last created unit)
                    • Else - Actions
                  • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
                • Else - Actions
              • -------- Spawn Ravagers --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • Leoric_Time Equal to 15
                      • Leoric_Time Equal to 20
                      • Leoric_Time Equal to 25
                • Then - Actions
                  • Set Leoric_Target = (Random unit from (Units in LeoricChamber <gen> matching ((Integer((Distance between (Position of Skeleton King Leoric 0038 <gen>) and (Position of (Matching unit))))) Greater than 400)))
                  • Unit - Create 1 Skeletal Ravager for Player 12 (Brown) at (Random point in LeoricCamBounds <gen>) facing Default building facing degrees
                  • Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                  • Unit - Order (Last created unit) to Attack Leoric_Target
                  • Unit - Add a 90.00 second Generic expiration timer to (Last created unit)
                  • Set Leoric_Target = No unit
                • Else - Actions
              • -------- End Alternate Phase - Boss Returns --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Leoric_Time Equal to 50
                • Then - Actions
                  • Set Leoric_Phase = Leoric_TrackPhase
                  • Game - Display to (All players) the text: (|cffff0000[Phase + ((String(Leoric_TrackPhase)) + ]|r))
                  • Set Leoric_Time = 0
                  • Countdown Timer - Destroy Leoric_AltPhaseTimerWindow
                  • Special Effect - Create a special effect at (Position of Skeleton King Leoric 0038 <gen>) using war3mapImported\WarpDarkCaster.mdx
                  • Unit - Move Skeleton King Leoric 0038 <gen> instantly to (Center of LeoricCamBounds <gen>), facing 270.00 degrees
                  • Special Effect - Create a special effect at (Position of Skeleton King Leoric 0038 <gen>) using war3mapImported\WarpDarkTarget.mdx
                  • Unit - Unpause Skeleton King Leoric 0038 <gen>
                  • Unit - Make Skeleton King Leoric 0038 <gen> Vulnerable
                • Else - Actions
            • Else - Actions
          • -------- All Phases --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • Leoric_Phase Equal to 1
                  • Leoric_Phase Equal to 2
                  • Leoric_Phase Equal to 3
            • Then - Actions
              • -------- Unholy Strike - (Every 18 Sec.) All Phases --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Leoric_Time mod 18) Equal to 0
                  • Leoric_Time Greater than 0
                • Then - Actions
                  • Game - Display to (All players) the text: Leoric gains |cff80...
                  • Unit - Create 1 Leoric Dummy for Player 12 (Brown) at (Position of Skeleton King Leoric 0038 <gen>) facing Default building facing degrees
                  • Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy Skeleton King Leoric 0038 <gen>
                  • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                • Else - Actions
              • -------- Bone Prison - (Every 15 Sec.) All Phases --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Leoric_Time mod 15) Equal to 0
                  • Leoric_Time Greater than 0
                • Then - Actions
                  • Game - Display to (All players) the text: Leoric casts |cff80...
                  • Unit - Create 1 Leoric Dummy for Player 12 (Brown) at (Position of Skeleton King Leoric 0038 <gen>) facing Default building facing degrees
                  • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Random unit from (Units in LeoricChamber <gen> matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True) and (((Matching unit) is A Hero) Equal to True)))))
                  • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                • Else - Actions
            • Else - Actions
          • -------- Phase 2 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • Leoric_Phase Equal to 2
                  • Leoric_Phase Equal to 3
            • Then - Actions
              • -------- Bone Spike - (Every 25 Sec.) Phase 2 and 3 --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Leoric_Time mod 25) Equal to 0
                  • Leoric_Time Greater than 0
                • Then - Actions
                  • Game - Display to (All players) the text: Leoric casts |cff80...
                  • Unit - Create 1 Leoric Dummy for Player 12 (Brown) at (Position of Skeleton King Leoric 0038 <gen>) facing Default building facing degrees
                  • Unit - Order (Last created unit) to Undead Crypt Lord - Impale (Random unit from (Units in LeoricChamber <gen> matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True) and ((Integer((Distance between (Position of Skeleton King Leoric 0038 <gen>)
                  • Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
                • Else - Actions
            • Else - Actions
          • -------- Phase 3 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Leoric_Phase Equal to 3
            • Then - Actions
              • -------- Terror - (Every 30 Sec.) Phase 3 --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Leoric_Time mod 30) Equal to 0
                • Then - Actions
                  • Game - Display to (All players) the text: Leoric casts |cff80...
                  • Unit - Create 1 Leoric Dummy for Player 12 (Brown) at (Position of Skeleton King Leoric 0038 <gen>) facing Default building facing degrees
                  • Unit - Order (Last created unit) to Neutral Pit Lord - Howl Of Terror
                  • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                • Else - Actions
            • Else - Actions
        • Else - Actions
          • -------- Boss Reset Procedure --------
          • Set Leoric_Time = 0
          • Set Leoric_Phase = 0
          • Set Leoric_HardMode = False
          • Trigger - Turn off (This trigger)
          • Trigger - Turn off Unholy Strike <gen>
          • Trigger - Turn off Leoric Hard Mode Tracker <gen>
          • Trigger - Turn off Leoric Heal <gen>
          • Trigger - Turn on Leoric Triggers <gen>
          • Unit Group - Pick every unit in (Units in LeoricChamber <gen> matching (((Owner of (Matching unit)) Equal to Player 12 (Brown)) and ((Matching unit) Not equal to Skeleton King Leoric 0038 <gen>))) and do (Unit - Remove (Picked unit) from the game)
          • Game - Display to (All players) the text: |cffff0000[Leoric e...
          • Unit - Pause Skeleton King Leoric 0038 <gen>
          • Unit - Make Skeleton King Leoric 0038 <gen> Invulnerable
          • Unit - Move Skeleton King Leoric 0038 <gen> instantly to (Center of Leoric Reset <gen>), facing 270.00 degrees
          • Unit - Set life of Skeleton King Leoric 0038 <gen> to 100.00%
          • Wait 15.00 seconds
          • Unit - Make Skeleton King Leoric 0038 <gen> Vulnerable
          • Unit - Unpause Skeleton King Leoric 0038 <gen>
          • Game - Display to (All players) the text: |cffff0000[Leoric e...
          • Neutral Building - Set Way Gate 0039 <gen> destination to (Center of Leoric <gen>)
I used a counting method to trigger the bosses spells based on how long the fight has been going on for, the trigger that resets the variables and such in a reset or before fighting the boss for the first time is seperate. There are a couple more triggers related to the boss but this is the only one that is bugged out.

I'm going to try one more thing real fast but if someone can take a look at the mentioned sections I would appreciate that.
 
Last edited:
Level 11
Joined
Jul 25, 2005
Messages
573
Erm, by no replies I'm guessing people are having problems finding the parts I'm talking about, here they are individually.

Unholy Blade - Causes Leoric's attacks to deal 20% increased magic damage to his target.

  • -------- Unholy Strike - (Every 18 Sec.) All Phases --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Leoric_Time mod 18) Equal to 0
        • Leoric_Time Greater than 0
      • Then - Actions
        • Game - Display to (All players) the text: Leoric gains |cff80...
        • Unit - Create 1 Leoric Dummy for Player 12 (Brown) at (Position of Skeleton King Leoric 0038 <gen>) facing Default building facing degrees
        • Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy Skeleton King Leoric 0038 <gen>
        • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Else - Actions
Bone Prison - Imprisons a random player in a prison of bone, dealing 275 damage each second for 5 seconds.

  • -------- Bone Prison - (Every 15 Sec.) All Phases --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Leoric_Time mod 15) Equal to 0
        • Leoric_Time Greater than 0
      • Then - Actions
        • Game - Display to (All players) the text: Leoric casts |cff80...
        • Unit - Create 1 Leoric Dummy for Player 12 (Brown) at (Position of Skeleton King Leoric 0038 <gen>) facing Default building facing degrees
        • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Random unit from (Units in LeoricChamber <gen> matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True) and (((Matching unit) is A Hero) Equal to True)))))
        • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Else - Actions
    • Else - Actions
Bone Spike - Impales a random target that is further than 400 range away from Leoric after 3 seconds.

  • -------- Bone Spike - (Every 25 Sec.) Phase 2 and 3 --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Leoric_Time mod 25) Equal to 0
        • Leoric_Time Greater than 0
      • Then - Actions
        • Game - Display to (All players) the text: Leoric casts |cff80...
        • Unit - Create 1 Leoric Dummy for Player 12 (Brown) at (Position of Skeleton King Leoric 0038 <gen>) facing Default building facing degrees
        • Unit - Order (Last created unit) to Undead Crypt Lord - Impale (Random unit from (Units in LeoricChamber <gen> matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) belongs to an enemy of Player 12 (Brown)) Equal to True) and ((Integer((Distance between (Position of Skeleton King Leoric 0038 <gen>)
        • Unit - Add a 8.00 second Generic expiration timer to (Last created unit)
      • Else - Actions
 
Last edited:
Level 19
Joined
Feb 25, 2009
Messages
2,004
Thats because you leak points
Use this way:

  • Melee Initialization
    • Events
    • Conditions
    • Actions
      • Set Leoric_Loc = (Position of Archmage 0000 <gen>) <-- this is needed to be leakless
      • Unit - Create 1 <DummyUnit> for Player 12 (Brown) at Leoric_Loc facing Default building facing degrees <--- 1 dummy popups at Leoric position and cast the buff
      • Unit - Add <DummySpell> to (Last created unit) <--- add the spell upon casting
      • Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy <Leoric> <--- I recommend to set Leoric to a unit veriable, it will be much easier and leakless
      • Unit - Add a 2.50 second Generic expiration timer to (Last created unit) <--- dummy unit dissapears after 2.5 seconds
      • Custom script: call RemoveLocation (udg_Leoric_Loc)
I recommend you to set "Leoric" as a unit veriable at the begining of the fight, so it will be easy to search him.
Then use a point veriable to find where he is.

Do this with all the spells, and you should not encounter any problems as long as you do it right.
 
Level 11
Joined
Jul 25, 2005
Messages
573
Thats because you leak points
Use this way:

  • Melee Initialization
    • Events
    • Conditions
    • Actions
      • Set Leoric_Loc = (Position of Archmage 0000 <gen>) <-- this is needed to be leakless
      • Unit - Create 1 <DummyUnit> for Player 12 (Brown) at Leoric_Loc facing Default building facing degrees <--- 1 dummy popups at Leoric position and cast the buff
      • Unit - Add <DummySpell> to (Last created unit) <--- add the spell upon casting
      • Unit - Order (Last created unit) to Undead Necromancer - Unholy Frenzy <Leoric> <--- I recommend to set Leoric to a unit veriable, it will be much easier and leakless
      • Unit - Add a 2.50 second Generic expiration timer to (Last created unit) <--- dummy unit dissapears after 2.5 seconds
      • Custom script: call RemoveLocation (udg_Leoric_Loc)
I recommend you to set "Leoric" as a unit veriable at the begining of the fight, so it will be easy to search him.
Then use a point veriable to find where he is.

Do this with all the spells, and you should not encounter any problems as long as you do it right.

Still isn't working even with this, I gave the dummy it's own model to see if it was even spawning, which it is.

But the dummy just stands there, still ignoring it's order... ugh.. this is driving me nuts
 
Level 11
Joined
Jul 25, 2005
Messages
573
FFS, what dummy do you use? I still have some problems if I use the Peasant as a dummy, try to use the Wisp as a dummy and try again >.<

If this doesn't help, I am empty of ideas.

I used the wisp as a dummy, even for all the heroes (they each had a seperate dummy though) I also never had to add the spells prior to the trigger ordering a dummy.

Just for some reason something in this trigger is making them ignore the order, and the abilities themselves aren't bug as I gave em to a peasant and tested all of them and they work perfect. I just dont get why it wont work.

I even tried seperate triggers, or a command to set it off manually, for some reason these wont go off if triggered, and i cant figure out why

Edit: I'll have to work on this more later tonight, I gotta head home from work. If anyone else has suggestions please post :( I'll probably try tinkering with the trigger when I get home.
 
Status
Not open for further replies.
Top