Master Cabalist
Member
Hi
So I have this alchemist table in the corner of my room. What it is supposed to do is when I click on it it takes me to another room, the alchemist lab, When you leave the lab and go back to the main room the lab is supposed to have a timer on it so you can't just hop in and out of th elab. I can go in and out of the lab but the timer isn't working. It isn't there at all. I worked on it all night and can't seem to figure it out.
ALCHEMIST TABLE OBJECT
Create Event
Step Event
EXIT SIGN OBJECT (to leave the lab and go back to the main room)
Left Pressed Event
So I have this alchemist table in the corner of my room. What it is supposed to do is when I click on it it takes me to another room, the alchemist lab, When you leave the lab and go back to the main room the lab is supposed to have a timer on it so you can't just hop in and out of th elab. I can go in and out of the lab but the timer isn't working. It isn't there at all. I worked on it all night and can't seem to figure it out.
ALCHEMIST TABLE OBJECT
Create Event
Code:
alchemist_timer = 0;
Code:
show_debug_message("Output alchemist timer: " + string(alchemist_timer));
if (mouse_check_button_pressed(mb_left) && mouse_x < x+400 && mouse_x > x && mouse_y < y+400 && mouse_y > y)
{
if (alchemist_timer <= 0)
{
alchemist_timer = room_speed*10000;
room_set_persistent(FirstLevel, true);
show_debug_message("Going to room. Saving RoomBeforeStore");
global.RoomBeforeAlchemist = room;
room_goto(AlchemistTableRoom);
draw_set_colour(c_black);
alchemist_timer = room_speed*10000;
}
}
if (alchemist_timer > 0)
{
alchemist_timer--;
instance_create_depth(x, y, 200, HourglassTimer);
show_debug_message("Alchemist Room TImer: " + string(alchemist_timer));
draw_text(x,y,string(alchemist_timer/100));
}
Left Pressed Event
Code:
show_debug_message("Going to room before store");
room_set_persistent(FirstLevel, false);
room_goto(global.RoomBeforeAlchemist);
// Only run the un-pause code if we actually un-paused.
if (global.RoomBeforeAlchemist != -1) {
global.RoomBeforeAlchemist = -1;
}