Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / Mouse pointer gun sight

Author
Message
rneilg
5
Years of Service
User Offline
Joined: 18th Mar 2015
Location:
Posted: 19th Mar 2015 19:32
Hi, I am slowly getting to grips with AGK. I can move a character around the screen and collect things etc.
I would like to make a game where the mouse moves a gun sight arounnd the screen to shoot stuff. Has anybody got a code snippit for this.
I would like to load my own image and have it move around with the mouse. The collisions and scroing I am ok with. Just stuck with using the mouse as a pointer.
Thanks
Neil.
BatVink
Moderator
17
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 20th Mar 2015 08:40
You can setrawmousevisible(0), and then positionSpritebyOffset() your gun sight at getRawMouseX() and getRawMouseY()

Quidquid latine dictum sit, altum sonatur

Login to post a reply

Server time is: 2020-09-24 23:08:13
Your offset time is: 2020-09-24 23:08:13