guys.. can you help me..
i'm planning to highlight an entity when it was clicked and holds the entity to move by clicking any location.
function scan_ent()
{
if(event_type == EVENT_CLICK)
{
printf("Entity Detected!"); // testing part
}
}
action play_walk() //animation of "walk" for this entity
{
enable_mouse = 2;
my.emask |= ENABLE_CLICK;
my.event = scan_ent;
while(1)
{ walk_percent += 3*time_step ;
ent_animate(me,"walk",walk_percent,ANM_CYCLE);
wait(1);
}
}
function cursor() //enables the mouse;
{
mouse_mode = 2;
mouse_map = cursor_pcx;
mouse_range = 2000;
}