It doesn't really matter if you check all 30 variables, because the performance impact is ultra small. Just one collision check is probably hundreds of times more intensive than a simple variable check.
Well said. There's no good way to do this - you can't skip the other events once you know you've hit one - but it doesn't matter, because the impact is so tiny you'd have 10,000x more effect (literally) on performance worrying about, say, the rendering efficiency. So why sweat the small stuff?
[quote:28hk23w1] events add so much overhead that it's kind of ridiculous to worry about efficiency.
Did you mean so little overhead? Or are you comparing it to real code?
Compared to real code, I mean. In traditional languages individual commands are very basic and low overhead. But events are very high-level, and do a lot of work for you in comparison to traditional script, so worrying about their performance is counterintuitive: they already perform badly compared to real script, but it doesn't really matter.
For 1-30
if state=loopindex
This would only work if each event for 1-30 had the same actions. But then why would you repeat an identical event 30 times in the first place?
Every tick
if state = 0
- do this event
An 'every tick' or 'always' event is redundant, because all events are already checked every tick.