(SOLVED)How to make a back button?

Good day everyone,

I’m currently developing a reading comprehension game and currently I’m struggling with my back button. My problem right now is the button behave back at one time.

Like, Lesson Select <-x- Stage Select <-x- Level Select <— Instruction. I asked chatgpt (I’m really desperate) and it gives the first solution which clearly doesn’t work and now it suggest the stack/array solution which I had difficulty to understand it.

I want it to become like this: Lesson Select <— Stage Select <— Level Select <— Instruction.

This is my current event sheet:

I’m almost at my deadline and this is the only thing preventing me from completing my prototype. English is not my first language, sorry for the confusion or grammar mistakes.

Best regards,
Nairisz

1 Like

Make number variable
When you press it subtract 1 from that number variable

Now you can display whatever you want depending on what value that number var have

Where you can do
BACK button is clicked change NumberVar set to

clamp(NumberVar - , 0 , 5)

And

NEXT button is clicked change NumberVar set to

clamp(NumberVar - , 0 , 5)

Clamp ensures that your Number variable will never go below 0 and never above 5

So if you want to go to 8 you change 5 to 8
Or if you want lowest possible to be 2 then you change 0 to 2

1 Like

Hello again!

Thanks it work now! I combine it with my previous solution with the new one since I have static and dynamic scene :slight_smile:

Static Scene:

Dynamic Scene:

For the dynamic scene I just need to minus to the root scene I wanted.

I hope that make sense. Thanks again☆*: .。. o(≧▽≦)o .。.:*☆

Nairisz
(●’◡’●)

2 Likes

Wanna go ultra fancy?
Like need only this

Make array call it SceneArray

Add a child variable to it and set it as text
Now add as many child vars so you have as many child vars as scenes you want to switch you have in total

EACH child value should be name of different scene in same order you go trough them

And now you can have ONLY this


And in 2nd event add action Change scene to SceneArray[NumVar]
Right under change NumVar variable action

And you will never need to add new events if you will have more scenes you want to go trough or if you gonna remove some

You will just either add or remove child vars
Enjoy