Hello,
It seems like I can't turn off and on checks for mouse click like I would any other code.
Let's say you have a variable that if its value is true a segment of code should run and if false it shouldn't. It seems to be that any mouse click triggers in the code runs independent of the variable value, being inactive but taking up performance as if they were active.
Does anyone have a solution for this?
Thanks!
Do you mean a condition like this?
Yes, Construct3 will go to the trigger every time, then check the variable, and not perform the action.
If you really want to isolate this trigger, you can place it in a group and disable this group when not needed. But it is better to focus on optimizing collisions, spawning, and physics, as these are always worth optimizing.
There is nothing wrong with this, and you should not worry about optimizing it, because every game engine will have similar costs.