Prioritize an action - ?

For questions about using Classic.

Post » Sat Aug 10, 2013 8:54 am

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!
B
18
S
5
G
1
Posts: 7
Reputation: 1,648

Post » Sat Aug 10, 2013 3:03 pm

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.
B
4
S
2
G
2
Posts: 109
Reputation: 1,318

Post » Sat Aug 10, 2013 6:50 pm

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!
B
18
S
5
G
1
Posts: 7
Reputation: 1,648

Post » Sat Aug 10, 2013 7:39 pm

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.
B
4
S
2
G
2
Posts: 109
Reputation: 1,318


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests