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

[General] What does cast skill then clean mean?

Status
Not open for further replies.
Level 5
Joined
May 8, 2020
Messages
78
Cast skill Dark
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Combo Dark
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Then - Actions
Wait 0.50 seconds
Sound - Play 123 <gen>
Wait 4.00 seconds
Player - Enable Portal Attack for (Owner of (Casting unit))
Trigger - Clear all pending triggers from the trigger queue
Else - Actions

I have command lines like this I want to ask what does cleaning a trigger mean? did i do it right?
And moreover, at some point when I'm playing my map it will crash like this, so what's the reason?

1682132337338.png
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543

Sounds like you're using an old version of Warcraft 3.

Also, I believe you want to do this:
  • Cast skill Dark
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Combo Dark
    • Actions
      • Wait 0.50 seconds
      • Sound - Play 123 <gen>
      • Wait 4.00 seconds
      • Player - Enable Portal Attack for (Owner of (Triggering unit))
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
Clearing the trigger queue will simply remove other triggers that were queued up to run. I have no idea why you'd want to do this as I've never run into a situation where this was necessary in any map.

By the looks of that trigger I fear you may be making other mistakes in your triggers that could cause problems. A lot of memory leaks come to mind.
 
Last edited:
Level 18
Joined
Mar 16, 2008
Messages
721
"cleaning a trigger" is vague and needs more context. do they mean leaks or something else?

I have no idea why you'd want to do this as I've never run into a situation where this was necessary in any map.
i read elsewhere it can help computers with really terrible hardware run the map better but idk if that's true.
 
Level 5
Joined
May 8, 2020
Messages
78

Sounds like you're using an old version of Warcraft 3.

Also, I believe you want to do this:
  • Cast skill Dark
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Combo Dark
    • Actions
      • Wait 0.50 seconds
      • Sound - Play 123 <gen>
      • Wait 4.00 seconds
      • Player - Enable Portal Attack for (Owner of (Triggering unit))
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
Clearing the trigger queue will simply remove other triggers that were queued up to run. I have no idea why you'd want to do this as I've never run into a situation where this was necessary in any map.

By the looks of that trigger I fear you may be making other mistakes in your triggers that could cause problems. A lot of memory leaks come to mind.
When I use this command it will turn off, so how do I turn it back on?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
Then don't destroy the trigger. A destroyed trigger is deleted and gone forever. Only do this with triggers that you no longer need, IF you care to do so. It's not necessary if you're running on somewhat modern hardware and use a proper version of the game.
 
Last edited:
Status
Not open for further replies.
Top