Hi again,
i use this code below, and i modify it a little bit. First, i tried to use the freeze_mode while the message is shown, but the game keeps freezing, wats wrong in my code?
and Second: How can i do it, so the message disappier again and the game stop freezing again only wen i hit the space key again.
CODE:---------
TEXT mymessage_txt
{
pos_x = 300;
pos_y = 100;
string("Damn! The way is blocked by a big hole in the floor!");
}
action my_blkdway
{
while (!player) {wait (1);}
while (1)
{
// if the player comes close to the object
if (vec_dist(player.x, my.x) < 100) // play with 100
{
if (key_space)
{
while (key_space)
{
wait (1);
} // wait until the space key is released
mymessage_txt.visible = on;
freeze_mode = 1;
wait (3);
freeze_mode = 0;
// for 3 seconds
mymessage_txt.visible = off;
}
}
wait (1);
}
}
Last edited by chris_oat; 05/01/09 19:50.