• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Trigger not working

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
I have this trigger to run after the boss of the game dies. Its just a bunch of special effects to make his death look appealling.
The cinematic turns on, the sounds play, however the special effects do not show. The wierd thing is, this was working 100%
in the last patch of my game, but I have no idea of what I've done to prevent it from working properly.

  • I tried setting "Mannaroth Ressurection" without the reference of other variables, didn't work.

  • I tried playing the special effect without any reference to variables, didn't work.

  • No, its not becuase the SPX isnt destroyed (and I'll worry about leaks after the trigger works)

I know its lengthy, but its just copy and paste. You should only need to look at the first special effect.

  • Boss Dies 1
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Dying unit) Equal to Mannoroth
    • Actions
      • Visibility - Create an initially Enabled visibility modifier for Player 1 (Red) emitting Visibility across (Playable map area)
      • Trigger - Turn off Boss Music <gen>
      • Trigger - Turn off Boss Periodic Zombies <gen>
      • Trigger - Turn off Boss War Stomp <gen>
      • Sound - Setup all volume channels for speech
      • Player Group - Pick every player in Players and do (Actions)
        • Loop - Actions
          • Camera - Pan camera for (Picked player) to (Position of Mannoroth) over 2.00 seconds
      • Cinematic - Fade out over 1.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 1.00 seconds
      • Cinematic - Turn cinematic mode On for (All players)
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • Unit - Remove (Picked unit) from the game
      • Cinematic - Fade in over 1.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
      • Wait 1.50 seconds
      • Player Group - Pick every player in Players and do (Actions)
        • Loop - Actions
          • Cinematic - Send transmission to (All players) from Mannoroth named Mannaroth: Play No sound and display ARGGGHHHHH!!!!!. Modify duration: Add 0.00 seconds and Don't wait
      • Set Mannaroth_Ressurection_O = 300
      • Set Mannaroth_Ressurection_D = 0
      • Set Mannaroth_Ressurection = ((Position of (Dying unit)) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 50.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of (Dying unit)) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 54.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of (Dying unit)) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 60.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 58.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 62.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 66.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 70.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 74.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 78.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 82.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 86.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 90.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 94.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 96.00% volume, skipping the first 0.00 seconds
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 0.20 seconds
      • Set Mannaroth_Ressurection_O = (Mannaroth_Ressurection_O - 20)
      • Set Mannaroth_Ressurection_D = (Mannaroth_Ressurection_D + 24)
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Sound - Play RaiseSkeleton <gen> at 100.00% volume, skipping the first 0.00 seconds
      • Wait 0.80 seconds
      • Set Mannaroth_Ressurection = ((Position of Mannoroth) offset by (Real(Mannaroth_Ressurection_O)) towards (Real(Mannaroth_Ressurection_D)) degrees)
      • Special Effect - Create a special effect at Mannaroth_Ressurection using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Environment - Create a 4.00 second Depression ripple deformation at Mannaroth_Ressurection with starting radius 250.00, ending radius 1000.00, and depth 124.00, using 1.00 second ripples spaced 250.00 apart
      • Custom script: call RemoveLocation (udg_Mannaroth_Ressurection)
      • Wait 2.00 seconds
      • Trigger - Run Boss Dies 2 <gen> (ignoring conditions)
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Hmm actually the effect itself is okay, only thing I can think of is "((Position of (Dying unit)) / (Position of Mannoroth)". You should use a variable to store the dying unit and refer to it in your "Mannaroth_Ressurection " variable.
Should work, because you remove all units, in this case you remove the dead Mannaroth too and then these 2 Positions are null!

Also I was wondering about your using of Ressurection_O, Ressurection_D and Ressurection variable anyway? You should try to use a loop instead of your way.
 
Level 16
Joined
May 1, 2008
Messages
1,605
Well I remember my first tries with loops and they went all bad and I never got what I wanted to get until someone helped me with it, so look this:

  • Loops
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Set TempPoint1 = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 15, do (Actions)
        • Loop - Actions
          • Wait 0.10 seconds
          • Set TempPoint2 = (TempPoint1 offset by (320.00 - (20.00 x (Real((Integer A))))) towards (24.00 x (Real((Integer A)))) degrees)
          • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
          • Custom script: call RemoveLocation(udg_TempPoint2)
      • Custom script: call RemoveLocation(udg_TempPoint1)
Notes:
- I just tried to base my loop on the way you use, but the special effects looks weird, but maybe its correct :eek:
- You should never ever use a wait action inside a loop BUT! you can do it, when the loop is fired once only at the same time. So in my example when the footman dies, the loop will be fired. When I kill another footman while the loop from the last kill is going on, it will be buggy.
But it seems to be your Mannoroth seems to be a boss or something which can only be killed once in a short time, you can use it!

== What the loop does ==
So as you see the loop goes from 1 to 15, which means the actions inside are fired 15 times.
Look at TempPoint2. I set the offset 320 - 20 * (Integer A) and the facing to -24 + 24 * (Integer A) this means:

loop-round 1 the offset is: 320 - 20 * 1 = 300 and the facing -24 + 24 * 1 = 0
loop-round 2 the offset is: 320 - 20 * 2 = 280 and the facing -24 + 24 * 2 = 24
loop-round 3 the offset is: 320 - 20 * 3 = 260 and the facing -24 + 24 * 3 = 48
.. and so on until the loop-round reaches 15.


Also loop can be uses very easy when you wanna create a circle of for example special effects. As you know a circle has 360°. Now you think about how many effects you wanna create (lets say 10 now) and then you simple use:
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • Set TempPoint2 = (TempPoint1 offset by 300.00 towards (36.00 x (Real((Integer A)))) degrees)
      • Special Effect - Create a special effect at TempPoint2 using Abilities\Spells\Undead\RaiseSkeletonWarrior\RaiseSkeleton.mdl
      • Custom script: call RemoveLocation(udg_TempPoint2)
so the effect is created in 300.00 distance faced 36, 72, 108, 144 ..until .. 360 (36 * 10(Integer A))

Well at the first time it looks a bit scary (and in GUI it is actually..) but after you used it some times you easily know how to handle loops^^
 

Attachments

  • Loop.w3x
    16.8 KB · Views: 30
Status
Not open for further replies.
Top