Thank you everyone for charing your tips :)
Daggio,@Bro7hers, looks like my research about events sheets failed me :/ I had completely forgot about those trigger events and how they are executed.
Kyatric, this function method sounds like a good option. Currently I really need to find a way to optimise my events.
Cassianno, yes, I did mean event groups so my bad -_- About your tip, personally I don't want to separate my events into many event sheets. Too much hassle and to me it's hard to keep track of what is where. This is completely personal opinion of course :) I like to use groups instead.
Another question rise from back of my head: I'm using same group structure as in my first post. Lets pretend that I have a boolean variable called "isActive" in group Enemy/AI.
Just for demonstration,
distance: player, enemy less than 50 > set enemy.isActive = true
when that boolean variable "isActive" is true > set enemy angle to player.X/Y.
else
distance: player, enemy greater than 50 > set enemy.isActive = false
Boolean variable "isActive" is false > set enemy angle to self.X/Y.
What are the benefits if I disable that Enemy/AI group when boolean "isActive" = false? Because I don't see any reason for C2 to check those events in that group if Boolean isn't true in the first place.
I was thinking something like this:
distance: player, enemy less than 50 > set group Enemy/AI > enabled and set enemy.isActive = true
Boolean variable "isActive" is true > set enemy angle to player.X/Y.
else
distance: player, enemy greater than 50 > set enemy.isActive = false
Boolean variable "isActive" is false > set enemy angle to self.X/Y, and set group Enemy/AI > disabled.
really quick and dirty example and I hope everyone will understand :)
What I understand about C2, is that it will check events in every event groups which are active (obviously). If I have that 3000+ events, I think it's not really beneficial to check events from every group if those events aren't used. Using that example above: if group Enemy/AI is active, C2 will check that group and that boolean. Then C2 will run the events depending of the boolean state. BUT if that group is disabled, then C2 will skip it and theoretically save some recourses.
If I'm completely wrong, please correct me. I really want to understand how to optimise events and how C2 is handling things.
-M-