How do I make a button do multiple actions

Get help using Construct 2

Post » Wed Oct 19, 2016 2:36 am

Message: JonnyBrove can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
ok so in the game in making it trying to make the button q change gravity and change it back so I'm able to just change between with 1 button

this is my game file its called Robert rogers it's not much but this would help a lot
https://mega.nz/#!xcg12D7L

if it asks for decryption key it's this
!Qp0e8vgh_VG4K0CF19Nc7H4NzG2QWsWx82XnuIbUDPI
B
9
S
2
Posts: 11
Reputation: 545

Post » Wed Oct 19, 2016 3:36 am

event: on touched/on clicked
action: change gravity
action: wait (for how many seconds you like)
action: change back the gravity
B
79
S
31
G
7
Posts: 148
Reputation: 9,179

Post » Wed Oct 19, 2016 7:25 am

you can try this:

create a function that changes gravity, this function takes 1 parameter
if param(0) is 1 then change gravity
if param(0) is 2 then revert gravity to normal
call this function on button q
B
45
S
13
G
2
Posts: 173
Reputation: 5,331

Post » Wed Oct 19, 2016 7:57 am

I think Daggio is closer to what you look if I understood correctly the problem. Here is a screenshot of what you could do :

Image

Hope that's what you're looking for!
Image
B
10
S
3
G
2
Posts: 81
Reputation: 1,735

Post » Thu Oct 20, 2016 6:41 pm

i will take a look into this thank you for the insight ill let you guys know how it works out
B
9
S
2
Posts: 11
Reputation: 545

Post » Thu Oct 20, 2016 7:45 pm

Just tried them out and I have to thank you guys so fking much You guys saved my life thank you so much, not only did I learn that you can choose a variable within sprite from the system. cant say thanks enough xD
B
9
S
2
Posts: 11
Reputation: 545

Post » Fri Oct 21, 2016 5:58 pm

Glad it helped @JonnyBrove! :) Keep it up!
Image
B
10
S
3
G
2
Posts: 81
Reputation: 1,735


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 6 guests