[quote="Davioware":28hk23w1]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.[/quote:28hk23w1]
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="Davioware":28hk23w1][quote:28hk23w1] events add so much overhead that it's kind of ridiculous to worry about efficiency.[/quote:28hk23w1]
Did you mean so little overhead? Or are you comparing it to real code?[/quote:28hk23w1]
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.
- do events
- end loop[/quote:28hk23w1]
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?
if state = 0
- do this event[/quote:28hk23w1]
An 'every tick' or 'always' event is redundant, because all events are already checked every tick.