I have a touch screen gravity button which flips gravity from 1 to -1, it works when the button is pressed, the only problem is that when the gamer holds the button it flips the gravity back and forth:
I have a new problem, abit of help would be great.
The gravity switch is fixed, when im moving to the right and hit the switch the player glides upwards at the correct angle, though when Im moving to the left and hit the switch there is a jolt to the right as the player starts moving upwards.
IF by switching gravity you not only mean UP and DOWN but also left and right
Then you need to add condition to 1st 2 events that checks if gravity button is NOT pressed
Also i am unsure what is best option for it but i think having events where you check for state of boolean being sub event of button pressed event which toggle that boolean isn’t best option
Ive encountered a bug, when I press right and release the player keeps moving constantly, I have checked my events and they look ok, I think its a bug.