I have a function to create a textbox object and set it values but the create event runs before that. this is the function code:
text_obj = instance_create(0, 0, obj_character_text);
text_obj.text = text;
text_obj.face = face;
text_obj.name = name;
and this is the create event:
current_text_index = 0;
current_text = string_char_at(text, current_text_index);
alarm[0] = 5;
How can I get the create event to run after the variables have been set?
instance_createruns the Create event before returning, so variables assigned afterwards would not be set as of the Create event running.I have an old blog post about the matter; the easiest is to store your desired init in a global variable, suppose
and in Create