Hello,
Can anyone explain, how does mouse_ent function exactly work?
Or even better, can anyone say, why this bit of code doesnt work?
while(1)
{ mouse_pos.x = mouse_cursor.x;
mouse_pos.y = mouse_cursor.y;
if(mouse_ent)
a=1;
else
a=0;
wait(1);
}
this should set variable a to 1, if mouse pointer is on any entity. Variable is watched on panel
digits(25, 5, "%1.f", *, 1, a);
It works when the position of the entity is (0,0,0), but when it is placed somewhere else, variable a is still 0, even when the pointer is on this entity.
What am I doing wrong?