Almost! Just a few changes:
Put "set gravityisreverse to true" directly underneath the "if vertical gravity = 85" block and then put another block saying "set gravityisreverse to false" directly underneath the "otherwise" block. Once you've done that, your boolean will return "true" if gravity is at -85, and "false" if gravity is at 85.
After that, you need to change your jump behaviour.
1. Firstly, make a copy of each of the events (when this actor hits something else, always) in your jump behaviour. We're going to make one set of events for when gravityisreverse=true, and another copy (with some changes) for when gravityisreverse=false
2. With the original version of events, put it all inside a wrapper which says "if gravityisreverse = false". That will mean that everything works like normal when gravityisreverse is false, so basically, when gravity is normal, everything is normal.
3. In the copied version of events, you need to firstly put each event (the copied versions of when when this actor hits something else, and always) inside a "if gravityisreverse = true" wrapper. This version of events will only trigger when gravity is reversed. The changes you need to make are:
- In the collision event, change the symbol for "smaller than" to "greater than". Basically, change the > for a <. This makes sure that the collision has been from above (that is to say, the actor has hit the "ceiling") whereas in the original, we were checking if the actor had hit the floor.
- And, in the always event, change the -1 to a 1 in the "push self sharply" block. This changes the direction of the "jump" (-Y value pushes the actor up, positive Y value pushes the actor down).