0 Favourites

Prioritize an action - ?

This forum is currently in read-only mode.
  • Hello!

    I'm building a platform Engine, and i got a problem that i can't fix.

    I have a 'jump-thru' platform that when the player is stepping in it, the keyboard(Down) is Down(holding) and the key 'x' is pressed, the player fall through this platform.

    The problem is, this 'X' key is the "JUMP" key, and whey i hold the key 'Down' and press the 'X', the player jumps but he doesn't fall through.

    So i was thinking if there is a possibility to prioritize the command fall through without disabling the JUMP command when the player is stepping in the Jump-Thru platform without holding the 'down' key.

    Thank You! <img src="smileys/smiley2.gif" border="0" align="middle" />

  • hi!

    im not sure if it works properly, but you could try and add a condition "key (down) is not down" to your jumping condition, to prevent jumping.

    so,

    -key (down) is down-      then right click it and select the invert condition.

    i guess thats the simplest way to do it.

  • Hi!

    This works, but i alread tried this, but the player have a ability to 'Crouch' when the key (Down) is down.

    But don't worry, i found an alternative way to avoid this problem, i will use you segestion plus will use the 'Crouch' command, and the player can't jump when crouched.

    Thanks for the help!

    <img src="smileys/smiley20.gif" border="0" align="middle" />

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • no prob.

    i guess it would be a good idea to always use private variables and "states" to avoid these kinds of contradictions,i know things get complicated when you have a lot of different actions and moves and rules and priorities and such..

    but anyway, glad you got it sorted out. <img src="smileys/smiley32.gif" border="0" align="middle" />

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