ENTITY* xy;
ENTITY* selecto;
var select=0;
function Move_xy(ENTITY* moveme)
{
selecto=me;
while(1)
{
if((mouse_left == 1)&(select==1))
{
if(moveme==mouse_ent)
{
mouse_ent.x +=7*mouse_force.y;
mouse_ent.y -=7*mouse_force.x;
// vec_set(xy.x, mouse_ent.x);
// vec_set(xy.y, mouse_ent.y);
}
}
wait(1);
}
}
function Move_models(ENTITY* moi)
{
xy=me;
while(1)
{
if((mouse_left == 1)&(select==0))
{
if(moi==mouse_ent)
{
ent_create("xyz.mdl",vector(moi.x,moi.y,moi.z),Move_xy);
select=1;
return;
}
}
if((mouse_left == 1)&(select==1))
{
if(moi==mouse_ent)
{
ent_remove(selecto);
select=0;
}
}
wait(1);
}
}