How to flip gravity?

FrazzleFrazzle Member Posts: 223
edited November -1 in Working with GS (Mac)
Basically, I want the actor to accelerate up or down every time i press the space bar.(VVVVVV style).
I've tried it by making an attribute called 'self gravity' and setting it up like this:
When space is pressed when self gravity is true, accelerate upwards at 700.
When space is pressed when self gravity is false,accelerate downwards at 700.
But when i press space nothing happens or it only flips gravity once.

Any help?

Comments

  • jstrahanjstrahan Member Posts: 498
    Try negative number Or rotate camera 180 degrees
  • ORBZORBZ Member Posts: 1,304
    I don't recommend rotating the camera 180 degrees unless you want to deal with the issues involving touch point detection.

    self.gravityCoefficient = 1

    accelerate 90 (scene) acceleration 700*self.gravityCoefficient

    rule spacebar down
    change attribute self.gravityCoefficient = gravityCoefficient * -1
  • juzcookjuzcook Member Posts: 259
    yeah camera rotating is very messy at the moment, hope they do something about this soon because it sure would make my current project alot more user friendly to play!
  • jstrahanjstrahan Member Posts: 498
    u could try this if u live in the northern hemisphere move to the southern hemisphere or vice-verse
Sign In or Register to comment.