Very nice idea, but it is very buggy. For example: when I used this in one object, everything works well, then tried it with another object and got this error:
ERROR in
action number 1
of Create Event
for object o_element:
Unable to find instance for object index -4
at gml_Script_execute_every_n_frames (line 44) - inst._interval = n
############################################################################################
gml_Script_execute_every_n_frames (line 44)
gml_Script_execute_after_n_frames (line 51) - inst = execute_every_n_frames(n, callback)
gml_Script_execute_after_n (line 113) - execute_after_n_frames(interval, callback);
gml_Object_o_element_Create_0 (line 3) - execute after 60 frames
gml_Script_instance_create (line 7)
gml_Script_engine_ne (line 120) - ( 0 + _spc + _xplus + (i-1) * ( ( (room_width - _spc*2) / (_noeol-1)) ) ,
gml_Script_scr_new_task (line 27)
gml_Script_anon_anon_gml_Object_o_program_Create_0_1590_gml_Object_o_program_Create_0_1798_anon_gml_Object_o_program_Create_0_1590_gml_Object_o_program_Create_0 (line 53) - scr_new_task();
gml_Object_obj_muffel_Alarm_0 (line 11) - _my_callback(self);
I used very simple line in event create:
execute after 60 frames
audio_play_sound(snd_score,3,0);
done