Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: shaun9991 on Mon 24/06/2013 17:03:34

Title: using a usermode cursor and disabling all others
Post by: shaun9991 on Mon 24/06/2013 17:03:34
Hi guys,

Sorry if this is a stupid question but I'm struggling to find the answers in the faq or on the forum

I've designed a scene where the cursor kind of 'is' the player. its a metal detector and you need to move it around to find stuff. so i would need to disable all other cursors and have this cursor visible for this screen only

does anyone know how to do this?

thanks
Title: Re: using a usermode cursor and disabling all others
Post by: Khris on Mon 24/06/2013 23:09:20
You can add an on_mouse_click function to your room script and intercept a mouse click in there.

Set mouse.Mode to the mode you want in the room's before fadein event.
And you should also turn off the GUI which contains the mouse mode buttons, if you're using it.

Then add this to the room script to disable right clicks:
Code (ags) Select
function on_mouse_click(MouseButton button) {
  if (button == eMouseRight) ClaimEvent();
}
Title: Re: using a usermode cursor and disabling all others
Post by: shaun9991 on Tue 25/06/2013 09:33:57
Thanks for your help Khris :)

I will try it out

Cheers