I have created extra mouse modes via the side panel under mouse cursors
I have a total of 12 mouse cursors in addition to the standard ones.
However new ones I have created seem not to be picking up in AGS.
I have clicked the pull down menu that says make this cursor a standard cursor.
I know I am missing something simple here.
The mouse cursor in question is Mode12 which is named Close "eModeClose"
Quote from: jamesreg on Wed 08/01/2014 19:56:06
However new ones I have created seem not to be picking up in AGS.
How are you setting the mouse modes? Do you use "cycling" with the
Mouse.SelectNextMode() command, or are you setting the mode with
mouse.Mode == ? Are you using a template?
I am asking because technically your setup should allow you to set modes as you see fit.
no thats not it im doing mouse.Mode = eModeInteract;
just like that
I think I know what the problem is; you're looking for additional events and wondering why they won't appear.
AGS only supports the events already listed when you create a game; to process additional cursor modes, use the Any click / other click event, and in the code, check mouse.Mode:
function hDoor_AnyClick() {
if (mouse.Mode == eModeClose) {
..
}
}
Hmm Interesting I did not know this.
Its wierd some of the custom ones I created appear in the menus and stuff maybe they are ones I renamed or something.
Great ill try it like you said and see if that does the job got to head off to work right now though.
Thanks again for saving the day I hate little things like this that are so simple but make you pull you hair out lol.
Yeah, you can rename the default cursors and the event names will change accordingly.
Also note that some cursors have hard-coded special behavior, like the walk, wait or useinv cursor.
It sounds like you're creating a GUI with lots of verbs, like Maniac Mansion's. A better approach might be to store the selected action in a variable and use the interact event for all of them. That's what the 9 verb GUI does. For one, you'll only have one function for each hotspot and object, and you can also more easily give a generic message in case an action is unhandled.
I never looked at the 9 verb thing before cause I had never been interested in a doing a game like this before so I hadnt been as familar with that part of the engine.Thanks for pointing me in the right direction.
Quote from: jamesreg on Wed 08/01/2014 19:56:06
I have a total of 12 mouse cursors in addition to the standard ones.
It is probably good coding practise to get this working, but from a players point of view I have to say I hate cycling through 3-4 mousemodes already. If you have some kind of lucas arts verb interface that is always visible to select the mousemodes or a verbcoinlike interface that could still work without annoying the player. Or add some keyboard shotcuts to quickly change mousemodes. Just my 2cents...