How do make a thing happen like this?


#1

Can someone know how do you make action go diffrent even though the contition makes the same.
Like example:
I click the play button and thing pops up and
I do the same thing except i go to the next scene.
Is it possible to do that?:thinking:


#2

Se ho capito bene, vorresti fare così: clicca la prima volta sul pulsante ed esegue la prima azione, poi clicca la seconda volta sullo stesso pulsante ed esegue la seconda azione diversa dalla prima.
È così, giusto?


#3

You can use variables so that each click depends on a different variable. I’ll just make up a variable name “playbutton”.

Event 1
Condition: Left Mouse down (or you can use Left Mouse Released)
Condition: Variable “playbutton” = 1
Condition: Trigger Once
Action = (whatever you want to pop up)
Action = Change Variable “playbutton” set to 2

Event 2
Condition: Left Mouse down (or you can use Left Mouse Released)
Condition: Variable “playbutton” = 2
Condition: Trigger Once
Action = Change scene


#4

What variable do you use to make it?


#5

You can use scene variable if you will only use the variable in the specific scene or use global variable if you want it to be accessable from all scene.


#6

It doesn’t happened did i do it wrong?


#7

The value to check in both condition are the same

It should be like this

CONDITION __________________ACTION


Mouse pressed_________The thing to happen
Variable = 0___________to happen the first time.
Trigger once_____________ Set variable = 1


Mouse pressed ________ The thing to happen
Variable = 1_________to happen the second time.
Trigger once ____________Set Variable to =0



#8

Try this… in the first yellow line on the right… add action Change the variable set to 2.
Second yellow line on the left… the variable = 2 (not 1)


#9

Again not working tried to put scene variable too.


#10

the initial variable value should be 1


#11

I mean by default, the variable value should be 1


#12

In yours the second condition is a sub condition to the first one. it should not be like this.


#13

Like Midhil said you don’t want it to be a sub-event, make them both separate events.

Unless you’ve set the playbutton variable to 1 at the beginning of the scene just change the variable numbers to 0 and 1 (not 1 and 2) in all these appropriate places. So where you put playbutton = 1, change it to 0. And where you put playbutton = 2 and playbutton set to 2, change those both to 1.


#14

Is not even working.


Even i try to change it still dosen’t work.


#15

Try this:


#16

so do i copy your or just make a change?


#17

Copy the changes.
Also if you want the action to loop.Add a change variable to 0, so it changes to 1 , 0 ,1 etc…
Or else it will only work the first time


#19

It still dose not work.


#20

What is the result you got from the code


#21

what result do you mean?