Conditions are just functions that return booleans.
You can do anything in them you could do in any normal function.
Yes, that includes use locals, etc.
Conditions for dynamic triggers are generally a pain because you have to clean them up.
That includes attaching them to the trigger, etc.
But for premade triggers that will be used many times, conditions are better.
That is because if a condition is false, the trigger will not run. Whereas for the if/then the trigger always runs. |