Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

[Workaround] Feature request: Max retry then auto-disable?

A topic by The any Key created Aug 22, 2018 Views: 328 Replies: 1
Viewing posts 1 to 2

Sometimes you dont need GMlive but still got the the object  in the first room. You output will be filled with "HttpError:HttpSendRequest". Is it possible to add a max retry? Ex GMlive will do 5 retries to check if the server is on. If all first 5 responses returned errors, the GMlive stop and disable itself, until the next start.

Developer

You can do so by adding a counter variable to obj_gmlive and changing obj_gmlive's Async - HTTP event to be like

if (live_async_http_check()) {
    live_async_http();
    if (!live_is_ready && ++retry_counter > 5) instance_destroy();
}

Someone else asked about this before so I'll see about adding a built-in thing later