• 🏆 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] Little help with my lullaby trigger?

Status
Not open for further replies.
Level 4
Joined
Nov 11, 2004
Messages
50
Hi, I'm just currently making a ability based off immolation. Now for starters everything works as I planned it to be except for when the text does not stop after I order him to turn off the spell and stop burning mana. Basically what the spell does is slows enemy units movement speed in a wide area of effect, I go the whole get rid of slow aura ability, but the text wont stop; it just keeps going. Can anyone identify the problem plz?

  • Nightmare Lullaby On
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(immolation))
    • Actions
      • Set TH_OrderUnit = (Ordered unit)
      • Set TH_LullabyVersePoint = (Position of TH_OrderUnit)
      • Unit - Add Nightmare Lullaby (Slow) to (Ordered unit)
      • Unit - Set level of Nightmare Lullaby (Slow) for (Ordered unit) to (Level of Nightmare Lullaby (Toy Horror) for (Ordered unit))
      • Trigger - Turn on Nightmare Lullaby Run out of Mana <gen>
      • Trigger - Turn on Lullaby Verse 1 <gen>
----------------------------------------------------------------------------
  • Nightmare Lullaby Off
    • Events
      • Unit - A unit Is issued an order with no target
    • Conditions
      • (Issued order) Equal to (Order(unimmolation))
    • Actions
      • Unit - Remove Nightmare Lullaby (Slow) from TH_OrderUnit
      • Trigger - Turn off Nightmare Lullaby Run out of Mana <gen>
      • Trigger - Turn off Lullaby Verse 1 <gen>
      • Trigger - Turn off Lullaby Verse 2 <gen>
      • Trigger - Turn off Lullaby Verse 3 <gen>
----------------------------------------------------------------------------
  • Nightmare Lullaby Run out of Mana
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (Integer((Mana of TH_OrderUnit))) Equal to 0
    • Actions
      • Unit - Remove Nightmare Lullaby (Slow) from TH_OrderUnit
      • Trigger - Turn off Lullaby Verse 1 <gen>
      • Trigger - Turn off Lullaby Verse 2 <gen>
      • Trigger - Turn off Lullaby Verse 3 <gen>
      • Trigger - Turn off (This trigger)
-----------------------------------------------------------------------------


  • Lullaby Verse 1
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set TH_LullabyVersePoint = (Position of TH_OrderUnit)
      • Floating Text - Create floating text that reads Lullaby and good ni... at TH_LullabyVersePoint with Z offset 10.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
      • Wait 0.75 seconds
      • Trigger - Turn on Lullaby Verse 2 <gen>
      • Trigger - Turn off (This trigger)
-----------------------------------------------------------------------------
  • Lullaby Verse 2
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set TH_LullabyVersePoint = (Position of TH_OrderUnit)
      • Floating Text - Create floating text that reads With lilies o'er sp... at TH_LullabyVersePoint with Z offset 10.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
      • Wait 1.50 seconds
      • Trigger - Turn on Lullaby Verse 3 <gen>
      • Trigger - Turn off (This trigger)
-----------------------------------------------------------------------------
  • Lullaby Verse 3
    • Events
      • Time - Every 3.00 seconds of game time
    • Conditions
    • Actions
      • Set TH_LullabyVersePoint = (Position of TH_OrderUnit)
      • Floating Text - Create floating text that reads Lay thee down now a... at TH_LullabyVersePoint with Z offset 10.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
      • Wait 2.25 seconds
      • Trigger - Turn on Lullaby Verse 1 <gen>
      • Trigger - Turn off (This trigger)
 
Last edited by a moderator:
Level 29
Joined
Jul 29, 2007
Messages
5,174
First I will advice you to use "Triggering Unit" instead of "Ordered Unit" because works most of time better then other things.

Now when you look at "Verse 3" you will see that you did a "Turn on Verse 1" action so you actualy made a loop that will just do Verse 1 -> Verse 2 -> Verse 3 -> Verse 1 Etc. Etc.

Second thing is, instead of doing all that stuff with unit orders, you can just do "A unit stops casting a skill" , "A unit starts casting a skill" Etc. its much easier to use

Now to avoid your problem I suggest you make a varible to indicate when your hero is casting.
For example make a booelon called "Casting" and set it false.
Then create a trigger that when your hero starts casting it will turn on, and in another trigger do that if Casting=False turn off Verse1,2,3 and if its true turn them on.

And last advice is, you can do all verses in one trigger instead of 3 and it will probably be less buggy.
just do verse 1 actions and do "wait 2 sec" (example) then do verse 2 actions "wait 2 sec" verse 3 actions.
 
Status
Not open for further replies.
Top