cursor change over hotspot and object

Started by andrea, Fri 12/11/2004 13:48:07

Previous topic - Next topic

andrea

hi

i'd like my cursor to change color, whenever it is over a hotspot or an object and change back to normal, when it is not. how do i do that?

Radiant

In repeatedly_execute_always, check GetLocationType (mouse.x, mouse.y) and set cursor mode accordingly.

andrea

sorry but i still don't get it. could somebody give me an example what exactly i have to put where exactly?
I'm not really into scripting...

Radiant

Code: ags

function repeatedly_execute_always () {
  if (GetLocationType (mouse.x, mouse.y) == 0) SetMouseCursor (2);
  else   if (GetLocationType (mouse.x, mouse.y) == 1 SetMouseCursor (5);
  // etc
  else  SetMouseCursor (3);
}


(look up help page for GetLocType, and set a mouse cursor type for each type of location that you need)

SMF spam blocked by CleanTalk