Hello. I need help with developing a system so that lever A (red) activates platform A (red) and lever B (blue) activates platform B (blue). this normally would be no problem, however, I use only one sprite for both levers and both platforms (to save space), so having animation or instance vars. will not work. What can I do?
Develop games in your browser. Powerful, performant & highly capable.
Instance variables is exactly what you need here. For example, you can create instance variable platformUID on the Lever sprite, set correct values for each Lever. When Lever is touched, pick Platform with UID=Level.platformUID and activate it.
Thank you! I was trying to accomplish that, but didn't know how until now. Thanks for the info!