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

[Trigger] Boolean vs Turning off/on trigger? (need info :)

Status
Not open for further replies.
Level 23
Joined
Nov 29, 2006
Messages
2,482
Hi y'all.

I have a question, mainly in the aspect if it causes possible lag or leaks.

<> Let say, in my cinematic trigger there are a boolean set to true. When this action is executed I have a second trigger which is running every 1.5 seconds of game time - When the boolean is true.
<> And then, after 10 seconds, I set the boolean to false. And yes, the second trigger is not running its actions anymore (so far so good).
<> But what if I replace the boolean with an action turning the second trigger on/off? In the aspect of lag/leaks, what should I do (what is the best really)?
<> I Had the theory, that if I use booleans - and it is set to false, the second trigger will still "try" to execute itself (but not run the actions inside it). It is, with other words, still running?
<> And if I then turn it on/off, the trigger wouldnt run, since its turned off...

Am I right here?

I would gladly accept more info about this =)

Until then...
/regards
 
Level 6
Joined
Nov 28, 2007
Messages
203
I Had the theory, that if I use booleans - and it is set to false, the second trigger will still "try" to execute itself (but not run the actions inside it). It is, with other words, still running?
Booleans are just conditions (at least in triggers). And triggers doesn't execute themselves if the/any of the main conditions are false.
But yes, it's still running, ofc, because it's turned on. It will always run when it's turned on. As fast it's triggered, or when it runs (when the event happens), it will check the main conditions, and if they/any of them are false, the trigger won't run.

And if I then turn it on/off, the trigger wouldnt run, since its turned off...
Nope. The turn on/off action is not even close to the same as boolean conditions. Think that when you turn off a boolean condition, it puts in whatever condition that will make the trigger not run, and when you turn on a boolean condition, it removes all the conditions that it put in there.

So.. no it won't lag (if u don't have a very old comp that prolly can't even start wc3) and it will probably not leak, but if it does, it's a very small leak. :thumbs_up:
 
Status
Not open for further replies.
Top