marasovec
Member
So, I have 2 objects in a room. The first one is for changing nickname an the second one is for changing level name. I use a global variable "global.nick_async" for the nickname changing object and a normal variable "lvl_name" for the level changing object.
But when I click on the nickname changing object it sometimes activates the level name changing async event and when I click on the level name changing object it sometimes also activates the nickname changing async event.
nickname changing object:
level name changing object:
But when I click on the nickname changing object it sometimes activates the level name changing async event and when I click on the level name changing object it sometimes also activates the nickname changing async event.
nickname changing object:
Code:
MOUSE CLICK EVENT
if position_meeting(mouse_x, mouse_y, id) global.nick_async = get_string_async("nickname", "");
ASYNC EVENT
if ds_map_find_value(async_load, "id") == global.nick_async
{
if ds_map_find_value(async_load, "result") != ""
{
global.nickname = ds_map_find_value(async_load, "result");
scr_settings_save();
}
}
Code:
CREATE EVENT
lvl_name = undefined;
MOUSE CLICK EVENT
if position_meeting(mouse_x, mouse_y, id) lvl_name = get_string_async("level name", "");
ASYNC EVENT
if ds_map_find_value(async_load, "id") == lvl_name
{
if ds_map_find_value(async_load, "result") != ""
{
global.filename = ds_map_find_value(async_load, "result");
room_goto(...);
}
}
Last edited: