Posted By: Hirogens
Click on Entity.[CLOSED] - 09/20/09 22:20
Hi,
How to intercept a click on Entity ?
regards
How to intercept a click on Entity ?
regards
function mouse_event()
{
if (event_type == EVENT_CLICK)
{
//entity has been clicked! do whatever you want to do!
}
}
function entity_event()
{
if (event_type == EVENT_CLICK)
{
ent_remove(me);
}
}
action entity_action()
{
my.emask |= ENABLE_CLICK;
my.event = entity_event;
}