[QUOTE=Fimbul][QUOTE=rexrainbow] FSM (finite state machine) architecture could be implemented in plugin.[/QUOTE]A behavior would be better, I think, because it would allow you to have many objects in different states simultaneously.[/QUOTE]
That's still possible with a variable, as each instance of an object can have a different value for the same variable.
[QUOTE=Fimbul]I call functions a "custom action" (they're synonymous right?).[/QUOTE]
Close enough. Functions are entire event structures containing events, conditions, actions, groups, comments that get called as an action. So it works like this:
- misc actions - place sprite somewhere, etc.
- call function "function name"
- other actions
On function "function name" (this is a condition)
Other condition, such as is sprite visible
- actions, sub events, etc.
As construct runs through the actions of event one, when it gets to the action 'call function "function name"' it puts event one on hold and immediately jumps to running event two. When it completes the event structure there, it goes back to event one and runs the rest of the actions there after the 'call function "function name"' condition. After finishing event one, it skips event two, because that only runs when then function is called.
[QUOTE=Fimbul]Why not apply the same thought to conditions? You can bundle a complex condition in a "custom condition".[/QUOTE]
It does seem like it would be potentially useful to people. I'm not sure if I would use it though, as it seems like an extra thing I would have to keep track of and remember what it did while reading code.
[QUOTE=Fimbul][QUOTE=arima]Hmm... Instance variable groups?[/QUOTE]Know what? That's actually better than what I proposed. As long as you could collapse the groups (both in the code editor and the layout editor), this should work fine.[/QUOTE]
I like that idea too, as long as typing a variable name would search inside all of the variable folders the same way typing an object name does. Having a ton of variables on an object can make it take longer to find the one you're looking for sometimes.