Hello
I create a game with levels and I wanted to make restart in every level, that when player make a mistake he see restart button jump on the screen . I did that but when i press restart it begin the scene with the restart button still. By the way at the beginning of the scene i tried with hide restart and delete restart , finally i created another scene to pass from it to this scene but also the res. Button still, although i deleted it in the same action that i press it to restart.
Now how i can view it and when restarting hide it,
mmm…
create scene_1
at begin of scene: hide RESTART button
when you die: show restart button
condition:
cursor on retstart button
restart button is visible
left botton release:
call scene scene_1
I only understood somewhat of what you said.
To make a restart button:
Cursor or touch is on Restart button
Change the scene to CurrentSceneName()
And to hide and show the Restart button, keep in in another layer and then:
If player dies
Show Restart layer
At the beginning of scene
Hide Restart layer
Another thing, in this event
Add a condition, If restart.Layer() is visible
But hiding the restart layer make the button active on the screen while it is hiding
Why the button still there although I delete it at the beginning,
Yeah, that’s why you have to add this condition:
with your restart event
No way the button still there when i return to the scene
Strange, if you hide it at begin of the scene is impossible.
How are you placing your button? As a single button or as a menu?
As a single
Can you arrange events or see what i did:
Ay the beginning hide a layer ( which has the button )
Player die : show restart layer
Event of button: cursor on it , left button pressed, if layer is visible then change the scene to another which includes scenes numbers. Then i press the scene which i restarted from it, it went there and all actions are on the right way except the button still there …
Did you mean, the button is not there, it disappears?
How is your restart button set?
Is it like this:
in the scene itself, or like this:
where you click on Pause button and restart button appears?
My button doesn’t dissapear never and ever
And it is a word ( restart)
(Pause button!!!) ? I don’t have one
What are you saying then?
Still there, i mean when i restart the button is still on the screen
No i put it in another layer
I wrote this code and I hope it help you.
at begin of game you see only object 2
If you click on it object 1 appairs
Than, if you click on opbect 1. the scene restart (and object 1 disappair)
Here the code: Drop Devloprog
thank you for your effort
this is a short file for my target ( the proplem is in Button “restart”
when ( life) = 0 ( restart ) appearsm then player press it to go to Scene (ALL) to press num ( 3) to comeback to Scene (3)
Ii wish to disable the Button when i restart Scene (3) )
https://drop.devloprog.org/r/dQ6yWsf4dG#BX2Hi1+2fo3Zphdw6pn6pVYWqX/qoZ3P8M/yOcFQEFc=
I also tried ( delete restart ) instead of ( Hide restart ) at the beginning of the scene but failed.
The file you have linked has no scenes, no objects or anything in the project. It’s a completely empty project file.