Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: PsychicHeart on Thu 10/11/2005 03:47:22

Title: Automatic Cursor Change At Game Start
Post by: PsychicHeart on Thu 10/11/2005 03:47:22
Hey y'all.
What is the script command for an Automatic Cursor Change?
I knew this before, but i can't remember now.
Title: Re: Automatic Cursor Change
Post by: Candle on Thu 10/11/2005 09:02:33
I use :
mouse.SaveCursorUntilItLeaves();
mouse.Mode = eModeTurn;
Title: Re: Automatic Cursor Change
Post by: Ashen on Thu 10/11/2005 10:51:55
It pretty much depends on how/when you want the change to happen.
Candle's script can work - depending, as I say, on what you want, and where you put it.
Title: Re: Automatic Cursor Change
Post by: PsychicHeart on Fri 11/11/2005 21:57:03
well, as you know, the first cursor when playing an AGS game is the Walk Cursor. I do not need the Walk Cursor for my game so, naturally, the Walk Cursor should change to the cursor i want (Interact) as soon as the game starts. Possible?
Title: Re: Automatic Cursor Change
Post by: Ashen on Fri 11/11/2005 22:07:26
1. mouse.Mode = eModeInteract in on_game_start
and/or
2. Deselect 'Standard mouse mode' for Walk to, and it should never appear, even when cycling the modes with right click (if you still use that).

Probably just 2 will do.
Title: Re: Automatic Cursor Change
Post by: monkey0506 on Fri 11/11/2005 22:10:20
if (mouse.Mode == eModeWalk) mouse.Mode = eModeInteract;

Just put that line into game_start() (in the main global script).  That should do it.  And then if you put the same thing into the repeatedly_execute() function then it will prevent the game from restoring the mouse cursor to the walk cursor.