Skip to content
This repository has been archived by the owner on Jan 29, 2021. It is now read-only.

async_dialog_complete()

Xubiod edited this page Oct 21, 2017 · 2 revisions

A function that returns true if OK is clicked

Syntax

async_dialog_complete()

Returns: Boolean


Example:

msg = get_integer_async("Level?", 1);

//In Async Dialogs Event
if (async_dialog_complete()) {
    room_goto(ds_map_find_value(async_load, "value"));
}

This gives a dialog box to the user and stores the ds_map into msg. When the dialog box is closed, the Async Dialogs event is triggered. If OK was clicked, get the value from the ds_map.


GML Equivalent:

These are how you can set up what this function without using the function. (This is from the GameMaker: Studio 1.4.x documentation.)

var i_d = ds_map_find_value(async_load, "id");
if i_d == msg
   {
   if ds_map_find_value(async_load, "status")
      {
          room_goto(ds_map_find_value(async_load, "value"));
      }
   }