using a usermode cursor and disabling all others

Started by shaun9991, Mon 24/06/2013 17:03:34

Previous topic - Next topic

shaun9991

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
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

Khris

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
function on_mouse_click(MouseButton button) {
  if (button == eMouseRight) ClaimEvent();
}

shaun9991

Thanks for your help Khris :)

I will try it out

Cheers
Support Cloak and Dagger Games on Patreon: https://www.patreon.com/user?u=460039

SMF spam blocked by CleanTalk