• 🏆 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] Pause Trigger makes unit stuck in endless loop or Pause/Unpause

Status
Not open for further replies.
Level 6
Joined
Apr 23, 2009
Messages
94
  • Untitled Trigger 020
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • ((Ability being cast) Equal to Pick Up) and (((Casting unit) is A Hero) Equal to True)
    • Actions
      • Unit - Pause (Casting unit)
      • Special Effect - Create a special effect attached to the overhead of (Casting unit) using Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl
  • Untitled Trigger 021
    • Events
      • Time - Every 4.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
      • Unit Group - Pick every unit in (Units owned by Player 2 (Blue) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
      • Unit Group - Pick every unit in (Units owned by Player 5 (Yellow) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
      • Unit Group - Pick every unit in (Units owned by Player 7 (Green) matching (((Matching unit) is A Hero) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Unpause (Picked unit)
Somehow that keeps the casting unit in an endless loop of pausing/unpausing.
But i'm not sure why.. Anyone?
 
Level 8
Joined
Aug 3, 2008
Messages
391
Try this:

  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pick Up
    • Actions
      • Unit - Pause (Casting unit)
      • Custom script: call PolledWait(4.00)
      • Unit - Unpause (Casting unit)


Oh and also, if you still prefer to use timers like in your second trigger to unpause your hero, I suggest you adding a buff/condition requirement. Because right now, that second trigger will fire every 4.00 seconds to unpause all heroes owned by player 1, 2, 5 and 7.
 
Level 10
Joined
Mar 31, 2009
Messages
732
Ew. I don't like your implementation.

What if you cast it, the unit is paused, then half a second later the second trigger fires?
Or you cast it, the unit is paused, then 3.80 seconds later the second trigger fires...

And yes, mass teleport is a follow through time ability. Base it off something else.
If you're not sure what to base it off, give us a description on exactly what the ability should do (animation, buff, and target wise).
 
Status
Not open for further replies.
Top