So. Have you ever been coding, and wondered; what if I could code a project to detect when someone presses the home button? When someone locks their device? Welp now you can! I’m not sure what uses this actually has, so please reply with any suggestions/comments.
Here’s the project:
https://c.gethopscotch.com/p/ztuo4wqga
Basically I use a simple program to find your current framerate, then use that to find the average FPS, and test if the current FPS dips way below the average, precisely as it does when hopscotch goes off-screen. Very simple, very useless. Enjoy.
Wow, great job!
Although the close thing isn’t the most accurate, it only will say that once I turn on and off the iPad, not when I exit Hopscotch.
Huh it works entirely for me just fine
Even when I try to remix but then go back it still detects something happened
@tankt2016 What does your FPS in the bottom right corner say most of the time? Just curious to see how that effects the projects performance, because it works in both my new iPad, and on my ancient iPhone.
49, 50, 51. It keeps bouncing between those.
Also, I exited the app, didn’t turn off my iPad, and went back into the app, and it worked fine. It detected the app was closed.
ok mr rex but did you check my post i gave you in the colbl topic?
i reloaded the page on the laptop version and it restarted the count back to 1.
That is really cool! It reminds me of the “restart detector” that @CreationsOfaNoob made a while back.
So the question is:
Any practical uses??
How does the statement that makes the text say “The project was closed” work??
If you want a project that was time based, like “catch as many coins as you can under 60 seconds”, maybe the game could pause when you leave Hopscotch? And then, when you came back, you would be presented with a screen like “Would you like to continue playing or start over?”.
Yes, very cool @William04GamerA, that’s a great use. Also, I noticed this project got unpublished, and I might of deleted it accidentally. I’m trying to recreate it now, but I can’t get it to work again!
Yes of course!
When you reopen the project, COAN’s “clock” could recalculate the timestamp - I may use that for E-Pad, assuming it can hold its framerate
I actually thought of this before and I was surprised to see it done, though I haven’t checked the project and hope it is easy to recreate.
btw is it possible to do this without framerate measure?
There is no need to worry about losing that project.
- Click on that link that you have in your first post, and Open it in HS.
- Play and publish.
Bam fixed!
btw I stole the code mwahahaha
The problem is it doesn’t save as a draft. And it doesn’t give me the option…
Wait from me? Right now?
If you open the link, it will take you to the project. Press play, the there is a publish button
yes I have a draft of it without the remix bar LOL (I won’t steal credit you can trust me)
Thank you. I did not see that…
Nice edit lol it’s ok
WAIT. That’s how you can steal projects… if you have the code and they unpublished it, it’s yours…