Reset Gravity?

This forum is currently in read-only mode.
From the Asset Store
Design for game, asset for game, game kit, UI design, completed design for game, mobile game, Gravity Shift
  • I'd like to know if it's possible to reset Fall Gravity's strength (Platform Behavior) in mid-air.

    I have a dash ability in my game that shoots the player forward by X pixels along a straight line, that can be used either on the ground or in mid-air. So the player is able to jump, and then dash during the jump, to cover larger distances.

    The issue I have is that when the Dash ability is used when the player is falling, he is shot forwards horizontally (by disabling the platform behaviour), but then the gravity strength resumes where it left off when the dash is completed and the platform behavior is re-enabled. It looks wrong, as though the player is being dragged down far too fast.

    I have tried setting the gravity strength to 0 once the Dash is completed, using the Wait command, and then setting it back to 1500 again, but that doesn't work. The gravity resumes at full strength instead of slowly building up.

    Does anyone have any ideas? Thanks for reading <img src="smileys/smiley12.gif" border="0" align="middle" />

  • If you disable the behavior all parameters are pending. They stay at their last value. Instead of setting the gravity strength to 0, you could try to change the state of the player object by changing its components of motion (probably to 0, found as actions under the movement tag). But I didn't test this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I love you so much. It works perfectly <img src="smileys/smiley31.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)