How do I give a keyboard button two different functions?

0 favourites
  • 8 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • I would like to tell the program to fall to the ground my character with a button and use the same button, then pressed, to make it back on its feet.

    A little like the "C" button, which is used in war FPS games to hide behind a crate and then pressed, to get up again.

    I had a look at the manual section, but I did not find very useful.

  • You just need to keep track of what state you are in. If on the ground, set a variable to 1, else set it to 0. Then use that to see which action state you are in when pressing the button/key, do the correct action, and update the state.

  • You think you can do a capx knowing that must walk on a plane? And 'surely nonsense but I'm working as hard on this project and now I am your time. It 's definitely easy to do but I arrived to a such that even just thinking I can hardly point of exhaustion.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You are of infinite kindness but we had thought too. Unfortunately, the command "else" is not visible on my own version of Construct 2. I have the latest release "stable."

    If I could use the "else" instance I would have already finished the game a lot of time ...

    Any other idea? Or can you tell me how to turn the "else" even in my own version of Construct 2 purchased with license "Personal"?

    I have the R221 version

  • What are you showing me I had already found here: https://www.scirra.com/tutorials/292/gu ... t-features

    but if I can not use "else" are in the same problem as before.

    Maybe I have to use a plugin?

    It 's strange that they did a tutorial but not visible from the Construct commands 2 ....

  • right click..

    or just press X

  • Got ninjaed but...

    Are you sure you know how to actually add an "Else" event, besides adding it from System when adding a new event? Just asking to make sure. You can also right click an event block (the left side), go into "Add", and select Else at the bottom of the list that pops up.

    Otherwise, some types of conditions are not available if certain conditions are in an event block. Some examples is that there can only be one trigger per branch (Usually "On X" or anything with a rightfacing green arrow), and things such as trigger once or on key pressed may not be available depending on what type of conditions are present in an event block. Try tinkering with your events to figure that out, i.e remove, check again (by attempting to add else), and either undo/redo.

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