How do I

Get help using Construct 2

Post » Sat Aug 06, 2016 10:18 am

How to make one key for two actions?

Let's say I set the key "spacebar" the two actions are "platform.gravity= -1500" and I want after pressing the space bar I was able again to click on it and turn on the code "platform.gravity= 1500".

But there is one thing. When I press the space bar, the engine thinks that I perform the action "platform.gravity = -1500" and not "1500". And all the same - How to put 2 actions in the occupied a key on the keyboard?

I hope you know what I said now.
P.S: Sorry for my English. :lol:
B
3
Posts: 1
Reputation: 177

Post » Sat Aug 06, 2016 2:46 pm

If you only want to change the value between positive and negative it easy:

Keyboard| On Space pressed -> System | Set platform.gravity * -1

You have do use a triggered event (green arrow), otherwise the value would change uncontrollable.
B
24
S
3
G
1
Posts: 454
Reputation: 2,171


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 25 guests