Im not sure how to approach this problem that I have.
I have a Gamescreen Collection that houses a levels game object and a UI game object. The levels object contain proxies(which contains Level collections, level1, level2, etc) and a proxy manager script. Each level collection has an instance of the player character.
The issue is that my UI contains the onscreen buttons to move the character for mobile. So far I’ve been using my keyboard to control the player directly from its script. How exactly do I construct an address that involves going into loaded proxies. i.e to reach the player character. To pass messages such as move left, move right, jump, etc? Is there a better way to approach this? I’m thinking I could record the bounds of the buttons in the player script but it sounds tedious. Any ideas?
msg.post("level"..level_id..":/player", "move_left")
--OR
--Gamescreen has the UI the message is sent from
--levels is the game object that contains the proxies
--level..level_id is the current loaded level(proxy). level_id being 1-N
msg.post("Gamescreen:/levels/level"..level_id.."/player", "move_left")