function house_event()
{
if (event_type == EVENT_TOUCH) // the house was touched?
{
my.ambient = 50; // make it look bright
my.lightrange = 50; // and generate light on a radius of 50 quants!
while (frame_speed <= 101)
{
ent_animate(my, "Move", frame_speed, ANM_CYCLE);
frame_speed += 8 * time_step;
wait(1);
}
frame_speed = 0;
}
if (event_type == EVENT_CLICK)
{
myText.flags |= SHOW;
}
else // the house isn't touched anymore
{
if (event_type == EVENT_RELEASE) // the mouse was moved away from it?
{
my.ambient = 0; // then restore its initial ambient value (zero)
my.lightrange = 0; // and stop it from generating light around it
}
}
}