#define ACT_EMO_ON skill99
function bide_event()
{
show_panels();
switch(event_type)
{
case EVENT_SCAN:
if(you)
emoon = you.ACT_EMO_ON;
break;
}
}
action bide()
{
my.event=bide_event;my.enable_scan=on;
}
your old code was bad, because every frame you get a new function, so your game will slow down very fast at a very low framerate
in this code you only need to c_scans!
the first is called like this:
my.ACT_EMO_ON = 1;
c_scan(...);//your scan code
now your variable emoon = 1
the second one looks like this:
the first is called so:
my.ACT_EMO_ON = 0;
c_scan(...);//your scan code
now your emoon = 0
this variant saves you many frametime and will be much easier to handle for the engine
try it...