Mouseover Cursor on "Objects"

Started by Eon_Star, Fri 28/06/2024 14:34:33

Previous topic - Next topic

Eon_Star

Hi.

I managed to make a cursor for the objects in my tutorial game.

I actually used the general script to create an object cursor and made a video how I used it in my tutorial game.

Here is the link: https://www.youtube.com/watch?v=AfN9PouTNho&t=41s

The script is:

OBJECT MOUSEOVER CUSTOM CURSOR SCRIPT (ADD TO GLOBAL SCRIPT)

(The "else" script at the end returns the cursor to the original "WalkTo" cursor )

function repeatedly_execute()
{
   LocationType loc_type = GetLocationType(mouse.x, mouse.y);
   if (loc_type != eLocationNothing)
   {
     Mouse.SaveCursorUntilItLeaves();
     if (loc_type == eLocationHotspot)
     {
       Mouse.Mode = eModeWalk;
     }
     else if (loc_type == eLocationObject)
     {
       Mouse.Mode = eModeInteract;
     }
     // and so forth
   }
   else
     {
       Mouse.Mode = eModeWalkto;
       
       }
}


I hope it helps.

SMF spam blocked by CleanTalk