Lets say for example I have a button that I want a player to be able to step on;
action button()
{
if(player.x > my.x)
{
perform action
}
}
By itself it runs just as it should without any problems. But say for example we then introduce multiple players (split screen), when we try to run the function only one player will be able to press the button as the "player" pointer can only point to one object at a time. So now one would just say "Use c_trace/c_scan". Unfortunately this isnt an option as there are a LOT of buttons and tracing/scanning will slow down the game immensely. How would you be able to have an entity react to multiple players WITHOUT tracing/scanning?