Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

Hey Zoey,

This code is amazing and it's what I'm looking for to work with my project! I have a quick question. Is it possible for the player to open and close the phone at any time/point they want? Because I was trying to create an image button and screen so the phone can be pulled up or put away at any time, but I'm having no luck. Any advice? Thanks!

Totally possible! I suggest checking out the demo script for reference. The general workflow goes something like this:

1. Once per your game's script, at the start typically, you want to call "$ reset_phone_data()". This just sets the slate blank for the start of your game. This should not happen per-button press.

2. To show the phone, at any time,  you want to run "$ phone_start()" which tells the game that the phone is present and then run "show screen phone_ui". These are the two things you want to run when you press the button to show the phone.

3. To hide the phone, you should just do the inverse of the above. You want to first run "hide screen phone_ui" to get rid of the phone on the screen, and then run "$ phone_end()" to tell your game that the phone screen is no longer present and that it should act accordingly.


Basically, in your "show" button, run Step #2, and in your "hide" button, run Step #3 - two lines of code each. If you need further help or have further questions, feel free to reach out to me on Discord @ kleineluka. I hope this helps ^^