Pole Swing help

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello all,

    I made a pole swinging engine using the cliffhanger code as reference. (Similar to Aladdin for the Snes) Once the player comes in contact with the pole the Player swings and then once the "Jump Key" is press he performs a jump flip everything works fine here.

    What I would like to have assistance on is when the player is on the pole swinging, how do you lock the direction the player is facing while on the pole, if the player tries to press a directional key? Lastly, once the Jump key is press how do you make the player jump forward automatically in the direction the player is facing?

    I hope this isn't too big of a request to kindly ask for assistance on, Any help would be appreciated. :/      

    dropbox.com/s/5h7cf785nahm4m3/Swing%20Beta.cap

  • Hi ChromeGadget, a solution to the first problem is to move the direction changing events for when Move Right and Move Left is down underneath the event "hanging = 0", above the event "NOT state = Attack".

    As for the second problem, add this action to jumping: maskplayer platform tab -> Set X component of motion to "210 * maskplayer.value('dir') * Sprite.AnimFrame"

    The 210 is a trial-and-error value, but the by multiplying by direction you move in the right way, and multiplying by animation frame allows it to be a strong or weak jump depending when the player presses jump.

    Here is the fix uploaded: https://dl.dropbox.com/u/4714446/Swing%20Fixed.cap

    I marked the two changes with comments starting with "HERE:"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you buddy! <img src="smileys/smiley1.gif" border="0" align="middle" />

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