My character walks in all 8 directions, like The Dig I'd very much like him to revert to the left-down/right-down whatever idle I have, so even if you would downwards he'll turn back to a diagonal direction when still.
Also I'm having a bit of a problem with my mouse, for some reason when I left click to interact with a hotspot it doesn't do anything it just walks me there.
function on_mouse_click(MouseButton button) // called when a mouse button is clicked. button is either LEFT or RIGHT
{
if (IsGamePaused() == 1)
{
//Game is paused, so do nothing on any mouse click
}
else
{
if (button == eMouseLeft)
{
//left mouse button
if (GetLocationType(mouse.x, mouse.y) == eLocationNothing)
{
//not over hotspot so walk
ProcessClick(mouse.x, mouse.y, eModeWalkto);
}
else
{
//over a hotspot/object etc
if (mouse.Mode==eModeUseinv)
{
//using inventory on hotspot
ProcessClick(mouse.x, mouse.y, eModeUseinv);
}
else
{
//not using inventory, so Interact
ProcessClick(mouse.x, mouse.y, eModeInteract);
}
}
}
else if (button == eMouseRight)
{
//right mouse button
if (mouse.Mode==eModeUseinv)
{
//inventory item out, so cancel it
mouse.Mode=eModeLookat;
}
else
{
//no inventory item out, so look
ProcessClick(mouse.x, mouse.y, eModeLookat);
}
}
else if (button == eMouseWheelNorth)
{
//mouse wheel up
}
else if (button == eMouseWheelSouth)
{
//mouse wheel down
}
}
}
I think this happened when I removed my inventory GUI. Also I have my cursor graphic change when I open up a menu GUI, it works when I open the menu but when I close it it takes a while to change back, I also tried changing it to if the game is paused or not it would change the cursor, it takes even longer to change back after closing the menu.
if (IsGamePaused() == 1)
{
mouse.UseModeGraphic(eModePointer);
}
if (IsGamePaused() == 0)
{
mouse.UseModeGraphic(eModeInteract);
}
I tried putting this in repeatedly executed but it kept spamming the normal graphic over the highlight graphic when over a hotspot causing a glitched cursor.
Also these are probably simple, how do you turn off the cursor? I have a paused game screen and I don't want a cursor there, or for cutscenes, it has the hourglass I guess I could make that invisible. And how can I have music pause when the game is paused?
Thanks.