Posted By: Nish
Selecting entities - 10/05/10 05:59
Hi,
how can i make the entity selected when i click it. Anyone can help me!...
how can i make the entity selected when i click it. Anyone can help me!...
ENTITY* selectedEntity = NULL;
function click_event()
{
if (event_type == EVENT_CLICK)
{
selectedEntity = me;
}
}
action myClickableEntity()
{
my.emask |= ENABLE_CLICK;
my.event = mouse_event;
}
function changePosX() {
if (selectedEntity != NULL) {
selectedEntity.x +=1;
}
}