aiming

Posted By: onslaught147

aiming - 01/02/08 09:07

does anyone know of a easy way to have a aiming reticle
Posted By: badapple

Re: aiming - 01/02/08 11:41

are you useing the templets ? if so i believe this feature is built in already
but i dont use them so cant say for sure, if your not useing templets , it is also easy to code it yourself

bmap sight1_bmp = <somebmp.bmp>;
bmap sight2_bmp = <somebmp2.bmp>; //use for when over enemy

mouse_mode=1;

//put a while loop in your function main to store mouse pos

give your enemys a skill in this case skill17 and a value of 2 "my.skill17=2;"
then the if statment in the while loop checks to see if the mouse pointer is
touching an enemy , if so it changes the image


while(1)
{

MOUSE_POS.x = screen_size.x/2;
MOUSE_POS.y = screen_size.y/2;
mouse_spot.x=bmap_width(sight1_bmp)/2;
mouse_spot.y=bmap_height(sight1_bmp)/2;
mouse_map=sight1_bmp;

if(mouse_ent!=null)
{
if(mouse_ent.skill17==2){mouse_map=sight2_bmp;wait(20);}
else{mouse_map=sight1_bmp;}
}
wait(1);
}



hope this helps
© 2024 lite-C Forums