Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Tue 15/02/2005 17:38:06

Title: Walk cursor mode? [SOLVED]
Post by: on Tue 15/02/2005 17:38:06
Im trying to change the cursor to Walk, this is what I'm using:

SetCursorMode(0);

However it sets it to the look cursor.

SetCursorMode(1);

This also sets it to the look cursor. All other other cursor number work correctly, except mode 0. Ive also tried MODE_WALK. Any Ideas?
Title: Re: Walk cursor mode?
Post by: strazer on Tue 15/02/2005 17:46:05
If you tick "Hide player character" for a room, the walk mode is not accessible since there's no player character there that can be moved.
Title: Re: Walk cursor mode?
Post by: on Tue 15/02/2005 18:00:44
I see, but Im calling SetCursorMode AFTER I move to a room where the player is visible.

IE:

Start room 999 (Menu Screen)
Click New Game
Move to Room 1 (Actual Game with character)
SetCursorMode(0);

SetCursorMode(0); is called directly after the move to the new room - How can I achieve the same thing? (bare in mind I don't want the cursor to change to walk EVERY time someone enters the room.
Title: Re: Walk cursor mode?
Post by: strazer on Tue 15/02/2005 18:11:14
NewRoom/Ex is a delayed-response command, meaning it gets executed when the script finishes.
So if you do


  NewRoom(1);
  SetCursorMode(MODE_WALK);


SetCursorMode is actually executed before the room has changed, and since the player character is hidden, it doesn't change to the walk mode.

What you can do is, on "Player enters screen (before fadein)" in room 1:


  if (character[GetPlayerCharacter()].prevroom == 999) { // if coming from menu screen
    SetCursorMode(MODE_WALK); // change to walk mode
  }
Title: Re: Walk cursor mode?
Post by: on Tue 15/02/2005 20:21:53
Thanks :)