• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

 (Suggestion) Screen_Refresh

can the yoyo game devs add a way to refresh the screen/draw call inside a while loop?
this would allow scripts that could be used for initializing, updating, and drawing instead of having to make a separate script for each event.

this would also allow script that run as objects and could induce menus while being able to return a value.


Friendly Tyrant
Forum Staff
You could test calling "event_perform" on all instances and perform their draw event... Not sure it'd work, but hey, I've never tried it either so it might... :)


Given how every export that GMS 2 exports to has a disdain for closed-loop, I/O-blocking ways of programming (in the form of throwing ANR error messages), I don't think YoYo should waste any time accommodating this request. Learn some proper asynchronous techniques instead.


ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
I'll be publishing an extension for this exact thing (screen_refresh alternative and a non-ANR sleep function) sometime soon. Currently done for Windows but hoping to get it to work on OSX/Linux too. Not possible on HTML5; Doing a synchronous loop on mobile platforms is discouraged IIRC.

Overall I don't think it'll make it's way back as a built-in function, but don't worry.