• 🏆 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!

Can't Turn Trigger Off?

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
Made an ability and the Loop trigger isn't turning off? I wonder why..

  • Energize Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Energize
    • Actions
      • Set EnergizeUnit = (Triggering unit)
      • Sound - Play Energize <gen> at 90.00% volume, attached to EnergizeUnit
      • Trigger - Turn on Energize Loop <gen>
      • Unit - Turn collision for EnergizeUnit Off
      • Countdown Timer - Start EnergizeTimer as a One-shot timer that will expire in 6.00 seconds
  • Energize Loop
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Game - Display to (All players) for 0.20 seconds the text: Energize Loop Run
      • Set TempPoint = (Position of EnergizeUnit)
      • Set TempUnitGroup = (Units within 128.00 of TempPoint matching (((Matching unit) belongs to an enemy of (Owner of EnergizeUnit)) Equal to True))
      • Unit Group - Pick every unit in TempUnitGroup and do (Actions)
        • Loop - Actions
          • -------- Only damages units who haven't been hurt yet. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is in EnergizeGroup) Equal to False
            • Then - Actions
              • Unit - Cause EnergizeUnit to damage (Picked unit), dealing (80.00 x (Real((Level of Energize for EnergizeUnit)))) damage of attack type Spells and damage type Normal
              • Unit Group - Add (Picked unit) to EnergizeGroup
              • Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call DestroyGroup (udg_TempUnitGroup)
  • Energize Turn Off
    • Events
      • Time - EnergizeTimer expires
    • Conditions
    • Actions
      • Game - Display to (All players) for 30.00 seconds the text: Timer has expired
      • Trigger - Turn off Energize Loop <gen>
      • Unit Group - Remove all units from EnergizeGroup
      • Unit - Turn collision for EnergizeUnit On
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
Yes the timer message shows. And I do not cast it every 5.5 seconds. I ll try using a boolean. Its strange that I should have to though.

Edit: I've figured it out. I had based the trigger off the Stone Crow Ability (tansforms unit). So whenever the transformation ended (and so did the trigger loop), the unit would transform back. This reverting transformation triggered the spell effect again. Was a simple fix. Thanks guys.
 
Last edited:
Status
Not open for further replies.
Top