Currently in my game, I have two types of bullets. A regular bullet, and one that can bounce off of walls. How could I make these toggleable? Currently I'm trying to reactive/deactive groups, but that's not working (I could just be doing it wrong.)
Develop games in your browser. Powerful, performant & highly capable.
You could give your bullet an instance variable eg "Bullet Type". Then when you check your bullets in code you check if their Bullet_Type is either regular or bouncy; then code the desired behavior for each.
To switch between the bullets I guess you would have a variable like "Current Bullet Type" which gets adjusted whenever the player switches firing modes.
On My Player
If my firing mode = bouncy...create bouncy bullets (with a bouncy bullet type instance variable)
On My Bullet..
If I am a bouncy bullet (my instance variable is bouncy)...do bouncy things