Okay everyone,
This is an advanced topic, but I would welcome everyone's thoughts on this. Perhaps the topic is complex but the solution is simple.
Lets say you are making a mario like game. Every character that runs around in the game is playable by the player.
Lets call these characters, "Characters". Lets also assume we are not using the platformer behavior (numerous problems with it prevent me from using it even as a base, but if one wanted to use physics the needs would be the same).
Every "Character" needs a way to track whether or not it is on the ground, on a wall, etc. as well as points to check for collisions. Every character also needs a control interface. If the player is in control, the interface will get input from the player, otherwise it gets input from the AI
On an individual level, programing a character is simple enough. Each character becomes a compound object placed in a container. Other objects are used to determine state, and just to keep things clean I will also use other objects to store certain information about the player. Since the character is wrapped up in a container, object picking is easy. You can simple say things like, every tick -> set position of foot state to maincharacter image point whatever.
But, though it may be simple enough to make this, repeating the above events (can be around 600) for every character type in the game is an obvious no go.
This is where families and functions come into play. But this is also where I can't figure out a fool proof way to hook everything up sensibly. As I said, on an individual level, containers make this a breeze. But I can't get that eeze of functioning to the family level.
On the last project I switched to unity so I could code, but I want to keep the next project in construct.
Does anyone have some good hookup ideas to get this system going without a lot of tedium and code repetition, the complete lack of OOP in construct can really bite at times and it seems to take more work to get simple oop ideas working.