I want to add switching platforms to my platformer game.
There will be 2 states;
On and Off.
On: Collider is on.
Off: Collider is off.
If it's in the "Off" state and the player gives input it will turn to the "On" state and the player can jump on it.
And if it's in the "On" state and the player gives input it will turn to the "Off" state and the player can't jump on it.
How can I do this?
Use a global variable to toggle on/off so a bool or set to 0/1. Then have conditions, if var is on/off, related to actions 'platform object set collisions enabled/disabled'
Develop games in your browser. Powerful, performant & highly capable.
Solved, thank you!