Hello guys I hope you can help me because im not so good at programming ( i`ll do my best
)
I`ve created an Action, that works pretty well. When I go to an entity who had this Action, I go to him until 500 Quants press the Space key and a Panel appear. this works really good but now my problem:
I can`t get it how to disappear this Panel after Iam pressing any key. Can you help me?
Code is in the Spoiler
(Sry for my bad English
)
bmap Angler_tga = <Angler.tga>;
sound Angler_snd = <Anglerspricht.wav>;
action Angler
{
// make sure that your player action includes this line of code: "player = null;" at its beginning
while (player == null) {wait (1);}
while (1)
{
if (vec_dist (player.x, my.x) < 500) // the player has come closer than 100 quants to the switch?
{
if (key_space == on) // the space button button was pressed?
{
while (key_space == on) {wait (1);} // wait until the button is released
// put your own code here
pan_create("bmap = Angler_tga; pos_x = 0; pos_y = 0; flags = overlay, visible;", 10); // layer = 10
snd_play (Angler_snd, 150, 0);
}
}
wait (1);
}
}