Making a reset button that is always visible on screen when the camera is following another actor
Hi all,
I know there have been many questions about reset buttons, but I can't find one that looks at this particular issue. I have a simple platformer game where the camera is following my hero around. However I also need to make it so that there is a reset button always visible on the screen. So, it needs to go wherever the camera/hero goes. The reason for this is that this game is going to be in an exhibition soon, and I know that people will play for a minute and then just walk away from it, and other people will come along straight afterwards, so they need to be able to easily reset the game from anywhere within play.
The other thing I've thought about is perhaps a timer that resets automatically when nothing has been pressed for a certain amount of time, but I'm also not sure how to set that up... which of these options sounds best/simplest?
Cheers!
Comments
Place the reset button on its own layer and uncheck 'scrollable' for that layer.
@Socks d'oh, you make it sound so easy Thanks for that! Ok, dumb question: I've made an example one, and placed it in its own layer and moved around the layers so that it is the top layer (also tried it as the bottom layer in case GS is around the other way), unchecked scrollable, etc. I've placed the reset actor at a point on the screen where it will be seen by the camera (so haven't made a mistake THAT dumb), but when I preview it, the button does not show. BUT it does work (as in I press the area on the screen where I know it must be, and it resets the game, but of course that's useless if no one knows the button is there). When I re-check 'scrollable', it does show.
I don't know how it can be disappearing behind anything because the only thing behind it is the background image, which I've placed at the back of the background layer. It definitely isn't an issue of opacity - right now it should be just a big white square.
I guess the way around it would be to say 'touch the right hand corner of the screen to reset'
The non scrollable layer needs to be the top layer. The actor needs to be placed at the beginning of the scene in that first camera area.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Hi @The_Gamesalad_Guru,
That's how I have it though when you say 'first camera area' do you mean anywhere in the opening camera area (camera 'size') or specifically the 'tracking area'?
Update: ok now I can click anywhere on the screen to reset - it won't constrain to the actor. Is my reset rule on my reset button actor perhaps incorrect??
Thanks for all your help.
You put the RULE inside the reset button. When Touch is pressed, Reset Scene. Is that how you did it?
@yattamove yes that's how I have it, though when touch is pressed isn't working at all, so I ended up going with when mouse button is down, which obviously doesn't do exactly what I want it to do but at least it is doing something that way. There must be something else weird about my layers that I can't work out.