• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Password System Not Working

M

Meowanator

Guest
I am trying to make a password system for unlocking a character, but it isn't working.

In the Button's Create Event:
Code:
password = "";
In the Button's Left Pressed Event:
Code:
password = get_string_async("Enter a Password","");

if password != ""{
    if password = "Zoroark"{
        if global.zoroark_unlocked = false {
            global.zoroark_unlocked = true;
            show_message_async("Unlocked Zoroark!");
        }else{
            show_message_async("Zoroark is already Unlocked.");
        }
    }else{
        show_message_async("That Password is not Supported.")
    }
}
When I type in the password, it always says "That Password is not Supported." even when I get the right password. I even tried not capitalizing the password and it doesn't work.
 

2Dcube

Member
I'm not really sure how get_string_async works but you could try get_string() ?
I think it could be that the code after get_string_async gets executed before you have entered the password.
 
Top