Help with mouse [SOLVED]

Started by LupaShiva, Sun 23/01/2011 03:23:08

Previous topic - Next topic

LupaShiva

Hello everybody

I want to create a mouse that when its over a character, object, hotspot, anything that it can interact, it appear an interact mouse mode, and when its outside a walk mouse mode, only wanted to use those 2 kinds of mouses, but honestly dont know exactly how to do it, i searched the manual and i think it has something to do with Changemodehotspot and disablemode, butI'm quite messed up with this, thank you all for the replies.

Khris

You need to use GetLocationType in repeatedly_execute and change the mouse mode accordingly.

LupaShiva

Thank you khris  :) already did it, ill post script if someone might need it.

function repeatedly_execute() {
 
  if (GetLocationType(mouse.x,mouse.y) == eLocationHotspot)
    mouse.Mode = eModeInteract;
  if (GetLocationType(mouse.x,mouse.y) == eLocationCharacter)
    mouse.Mode = eModeInteract;
  if (GetLocationType(mouse.x,mouse.y) == eLocationObject)
    mouse.Mode = eModeInteract;
  if (GetLocationType(mouse.x,mouse.y) == eLocationNothing)
    mouse.Mode = eModeWalkto;}

Khris

Or just:

Code: ags
  if (GetLocationType(mouse.x,mouse.y) == eLocationNothing) mouse.Mode = eModeWalkto;
  else mouse.Mode = eModeInteract;

LupaShiva


SMF spam blocked by CleanTalk