How do I give a keyboard button two different functions?

Get help using Construct 2

Post » Sat Mar 19, 2016 4:04 pm

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.
B
7
S
2
Posts: 57
Reputation: 696

Post » Sat Mar 19, 2016 5:04 pm

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.
ImageImageImage
B
71
S
22
G
258
Posts: 3,791
Reputation: 143,198

Post » Sat Mar 19, 2016 9:19 pm

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.
B
7
S
2
Posts: 57
Reputation: 696

Post » Sat Mar 19, 2016 9:43 pm

ImageImageImage
B
71
S
22
G
258
Posts: 3,791
Reputation: 143,198

Post » Sun Mar 20, 2016 12:08 pm

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
B
7
S
2
Posts: 57
Reputation: 696

Post » Sun Mar 20, 2016 12:14 pm

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 ....
B
7
S
2
Posts: 57
Reputation: 696

Post » Sun Mar 20, 2016 12:22 pm

right click..

Image

or just press X
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sun Mar 20, 2016 12:28 pm

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.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
52
S
24
G
30
Posts: 537
Reputation: 19,651


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests