var scanning;
TEXT* scanning_txt =
{
string("[E] druecken]");
}
function got_scanned()
{
//scanning= c_trace (player.x,my.x,IGNORE_ME|IGNORE_PASSABLE);
while (event_type == EVENT_SCAN && scanning=1)
{
set (scanning_txt, VISIBLE);
wait (1);}
reset (scanning_txt, VISIBLE);
}
action my_entity() // attach this action to your entities
{
scanning= c_trace (player.x,my.x,IGNORE_ME|IGNORE_PASSABLE);
my.emask |= ENABLE_SCAN; // make the entity sensitive to scanning
my.event = got_scanned;
}