N
NValorz
Guest
First time creator/poster!
I'm making an endless runner that had been going seamlessly... until I made a title screen. The title screen has a simple object that, when enter is pressed, executes "room_goto(rm_level1)". The issue is when I go into level 1, only some of the objects initialize. The below objects exist (and work) when the title screen is NOT present:
I don't think it's a persistence issue as I've tried making every object persistent before running the game. I've also tried explicitly executing the creation script in the rooms create code, but no dice. I'm currently using GameMaker Studio 2 on Mac, thank you for reading this and let me know if you can help!
I'm making an endless runner that had been going seamlessly... until I made a title screen. The title screen has a simple object that, when enter is pressed, executes "room_goto(rm_level1)". The issue is when I go into level 1, only some of the objects initialize. The below objects exist (and work) when the title screen is NOT present:
- Player
- Infinitely generating platforms
- Crystals (points, "cry")
- Healing/Hurting items
- Boxes
Code:
///gen
{
alarm[0] = 90;
i = choose(scr_cry1, scr_cry2, scr_cry3);
h = choose(416, 448, 480, 512)
instance_create_layer(room_width, h, "Instances", obj_ground)
///create crystals
script_execute(choose(i,i,i), irandom(1));
///create boxes
if (global.current_score < 50) {
instance_create_layer(room_width+(irandom_range(64, 288)), h, 0, obj_box);
instance_create_layer(room_width+(irandom_range(570, 800)), h, 0, obj_box);
}
else {
instance_create_layer(room_width+(irandom_range(64, 288)), h, 0, obj_box);
instance_create_layer(room_width+(irandom_range(320, 538)), h, 0, obj_box);
instance_create_layer(room_width+(irandom_range(570, 800)), h, 0, obj_box);
}
}