Hi, I am trying to make a GK2 style game so I have a GUI appearing on the bottom of the background room (always visible) . And I want the mouse to change mode each time it passes the edges of the room to an exit mouse cursor, and then to change back again. So I put 3 hotspots with the following code:
function hHotspot2_MouseMove()
{
mouse.SaveCursorUntilItLeaves();
mouse.Mode= eModeRoomExitL;
}
function hHotspot3_MouseMove()
{
mouse.SaveCursorUntilItLeaves();
mouse.Mode= eModeExitright;
}
function hHotspot4_MouseMove()
{
mouse.SaveCursorUntilItLeaves();
mouse.Mode= eModeExitDown;
}
The problem is that when my cursor passes the hotspot at the bottom edge and moves over the GUI it changes to exit cursor and stays that way... How can I set a specific cursor mode when the cursor is over the GUI?
For an image go to:
http://img24.imageshack.us/my.php?image=roomgui.png (http://img24.imageshack.us/my.php?image=roomgui.png)
The way I would do it is to put the code for changing the mouse mode in the game's 'repeatedly execute' function; when the mouse is below a certain y-coordinate, change it to 'pointer' for the GUI, when the mouse is over each of the exit regions, switch it to the exit cursor, and when the mouse is over none of those, change it to the default mode. That way, you also wouldn't need to put this code in every single room.
Thanks for the quick reply!
I'm not much of a scripter so, can you show me the code, how would you do it?
There are 2 or 3 different methods in this post (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=36670).
Thanks for the help guys!
Another problem solved! ;D