J
Jonathan Nguyen
Guest
I want to implement unlockable levels but I dont know what to do,currently i have a global.level for each level with each set to false
this is the code for the button
and this is the code in my initialiser object
I dont know where to set global.level2_unlocked = true
I only want the level to unlock if the player finishes lvl 1 and goes to lvl 2
Code:
/// @description Insert description here
with (o_btn_lvl1)
{
selected = false;
}
with (o_btn_lvl3)
{
selected = false;
}
if (global.level2_unlocked)
{
selected = false;
if global.level2_unlocked = true
room_goto(r_level2)
}
Code:
global.level2_unlocked = false;
global.level3_unlocked = false;
I dont know where to set global.level2_unlocked = true
I only want the level to unlock if the player finishes lvl 1 and goes to lvl 2