Writerstix77
Member
I am trying to create a 6-digit combination lock, where once the player puts in the correct combination, an item appears in another room. I have a Combo_dial_obj with 10 index images (0-9). That functions fine as far as scrolling through the numbers when clicked. However, I am having issues with the puzzle itself. I have Combo_Dial_Control with the following Step Event:
1 global.dial_1 = Combo_dial_obj(inst_A);
2 global.dial_2 = Combo_dial_obj(inst_B);
3 global.dial_3 = Combo_dial_obj(inst_C);
4 global.dial_4 = Combo_dial_obj(inst_D);
5 global.dial_5 = Combo_dial_obj(inst_E);
6 global.dial_6 = Combo_dial_obj(inst_F);
7
8 if
9 global.dial_1.image_index == 8 and
10 global.dial_2.image_index == 1 and
11 global.dial_3.image_index == 2 and
12 global.dial_4.image_index == 7 and
13 global.dial_5.image_index == 9 and
14 global.dial_6.image_index == 3 then
15 {
16 instance_create_layer(5,5,"Instances",Combo_Kill_obj)
17 room_goto(BookshelfRoom)
18 room_instance_add(BookshelfRoom,392,256,blueprint_in_box_obj)
19 }
The game fails to run, noting the following errors:
Compile Objects...
Error : gml_Object_Combo_Dial_Control_Step_0(4) : unknown function or script Combo_dial_obj : 19A54B7A
Error : gml_Object_Combo_Dial_Control_Step_0(5) : unknown function or script Combo_dial_obj
Error : gml_Object_Combo_Dial_Control_Step_0(6) : unknown function or script Combo_dial_obj
Error : gml_Object_Combo_Dial_Control_Step_0(7) : unknown function or script Combo_dial_obj
Error : gml_Object_Combo_Dial_Control_Step_0(8) : unknown function or script Combo_dial_obj
Error : gml_Object_Combo_Dial_Control_Step_0(9) : unknown function or script Combo_dial_obj
I don't know what Instance 19A54B7A is, as nothing in the room has that code. Also, it seems odd that lines 4-9 are mentioned, and not 1-6.
Anyway, I'm not quite sure what I am doing wrong. If someone could give me advice, I'd appreciate it.
Thanks,
1 global.dial_1 = Combo_dial_obj(inst_A);
2 global.dial_2 = Combo_dial_obj(inst_B);
3 global.dial_3 = Combo_dial_obj(inst_C);
4 global.dial_4 = Combo_dial_obj(inst_D);
5 global.dial_5 = Combo_dial_obj(inst_E);
6 global.dial_6 = Combo_dial_obj(inst_F);
7
8 if
9 global.dial_1.image_index == 8 and
10 global.dial_2.image_index == 1 and
11 global.dial_3.image_index == 2 and
12 global.dial_4.image_index == 7 and
13 global.dial_5.image_index == 9 and
14 global.dial_6.image_index == 3 then
15 {
16 instance_create_layer(5,5,"Instances",Combo_Kill_obj)
17 room_goto(BookshelfRoom)
18 room_instance_add(BookshelfRoom,392,256,blueprint_in_box_obj)
19 }
The game fails to run, noting the following errors:
Compile Objects...
Error : gml_Object_Combo_Dial_Control_Step_0(4) : unknown function or script Combo_dial_obj : 19A54B7A
Error : gml_Object_Combo_Dial_Control_Step_0(5) : unknown function or script Combo_dial_obj
Error : gml_Object_Combo_Dial_Control_Step_0(6) : unknown function or script Combo_dial_obj
Error : gml_Object_Combo_Dial_Control_Step_0(7) : unknown function or script Combo_dial_obj
Error : gml_Object_Combo_Dial_Control_Step_0(8) : unknown function or script Combo_dial_obj
Error : gml_Object_Combo_Dial_Control_Step_0(9) : unknown function or script Combo_dial_obj
I don't know what Instance 19A54B7A is, as nothing in the room has that code. Also, it seems odd that lines 4-9 are mentioned, and not 1-6.
Anyway, I'm not quite sure what I am doing wrong. If someone could give me advice, I'd appreciate it.
Thanks,
Last edited: