P
Phsyrik
Guest
So I have a store in my game, and when I buy something, and come back to the store its locked again. I need to make it stay unlocked
So when I go to a different room, and come back to rm_store the item is locked again. My guess is that its resetting the value of orangelocked to 0, but I dont know how to keep the value 1 after it has been bought.
Code:
CREATE
global.orangelocked = 0;
STEP
if (device_mouse_check_button(0, mb_left) && global.coincount >= 200 && global.orangelocked == 0)
{
global.coincount = global.coincount - 200;
global.orangelocked = 1;
global.shiptype = 1;
}
DRAW
if (global.orangelocked == 0)
{
draw_sprite(s_locked200, 0, 30, 60);
}
else if (global.orangelocked == 1)
{
draw_sprite(s_orangestore, 0, 30, 60);
}