This is something I've had to tear down to its most basic elements in order to strip out all the fat from my experimental stuff, and I want some help on making this work.
What I'm trying to make is basically:
How I have it set up so far:
-- The "Plat_Stats_General" object, which is the 'base' Player object, storing variables that are more 'universal', such as health, money, etc. This always persists for any given player.
-- The "InputPlayer" object, which is contained in the object above, which handles the input for that specific player with a large set of variables. Is persistent.
-- The "platforming" object, which handles all the platforming for a given character. Contains the relevant character 'skin', and character-specific variables. Can be destroyed to be swapped out for another character.
-- The character 'skin'.
Now, the main problem I'm having right now is that the only way I can get the separate players to respond only to their respective controls is to use 'For Each' loops. Problem is, the loops prevent me from using triggers as sub-events, and believe me, there's a lot of triggers involved in creating a fully-functioning character. But using picking conditions doesn't seem to be nearly enough, unless I'm somehow doing it wrong. Is there a better way I should be going about all this?
*Cap link removed for the time being*
Give me an example of an event you want to trigger.
— I'm mainly talking about stuff like animation triggers for the platform behaviour (On Stopped, On Landed, etc.), though in hindsight, most of that stuff might be able to work in a separate group outside of the "For Each" loop(s), as they generally don't come into contact with the control-related events that need to be in the loop.
Develop games in your browser. Powerful, performant & highly capable.
You wouldn't need to use For Each for that. It would be something like On Stopped > (Family)Trigger Animation
— Yeah, as I mentioned, I'm heavily considering splitting the character-specific events into two sections each - the 'general' events that don't need to be in the For Each loop, and the control-based events that require the loop in order to distinguish between players.
Alright, I've gone back to this topic, it seems...
Well, right now, I've got two sets of events - one for control-based events in the big 'for each' loop, and another group for events that can't go in there. While I've managed to fix up many events to enable multiple players to work better, I've also hit a snag when it comes to 'duplicates' - when two players are using the same 'character', there are, well, issues. Player 1 works fine, but Player 2 is unable to properly end some animations, as "on any animation end"/"on animation <animation name> end" doesn't properly trigger for some reason, which causes the second player to be stuck on the specific action.
This is obviously a problem. Any ideas on how to work around it?