brockatkinson's Recent Forum Activity

  • Hi.

    What I essentially want is a platformer plugin, which can invert its own gravity and go on the roof. Sounds simple enough.

    I edited the platformer plugin, and there was the snippet:

    acts.SetGravity = function (grav) {
         this.g = grav;
         if (this.g < 0)
              this.g = 0;
    };

    So I simply removed the if() case, and was able to set my character's gravity to -1500 and it worked perfectly; he 'fell' onto the roof, just like I assumed he would.

    I want to have it able to be changed in the game, and I've set up keys to change the gravity (from 1500 to -1500). However, every time I go to change his gravity value in an event, it initializes it back to zero for some reason.

    Is there some type of fallback in the event code which does this?

    tl;dr the event manager, for some reason, won't let me change a behaviour plugin to negative, even though the plugin has been altered to allow for that.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
brockatkinson's avatar

brockatkinson

Member since 31 Aug, 2011

None one is following brockatkinson yet!

Connect with brockatkinson

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies