Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: CodeJunkie on Thu 14/07/2005 17:14:15

Title: Walkable areas are unwalkable
Post by: CodeJunkie on Thu 14/07/2005 17:14:15
I have a main walkable area in my room (A), and two walkable areas disabled after fadein (B and C).Ã,  I can walk around fine on A, but when I try to enable C I can't walk on it.Ã,  Even if I don't disable C, I still can't walk onto it.Ã,  I've checked the repeatedly_execute and global scripts, and they don't disable this walkable area.Ã,  Neither do object scripts.
It's so irritating, and I can't find any way to work around it.Ã,  A prompt reply would be nice, I'm looking to get this game done within the next 24 hours or so :)

I'm using AGS 2.62.509 if it helps.
Title: Re: Walkable areas are unwalkable
Post by: Ishmael on Thu 14/07/2005 17:15:15
Hmm... Seems very simple, but are you sure the walkable areas are connected?
Title: Re: Walkable areas are unwalkable
Post by: monkey0506 on Thu 14/07/2005 17:16:14
This may be a stupid question, but are the walkable areas connected?  Because if they aren't I don't believe you can walk between them.

Edit:  My internet was screwing up...so sorry that I posted pretty much the same thing as Ish.
Title: Re: Walkable areas are unwalkable
Post by: CodeJunkie on Thu 14/07/2005 17:17:47
Yes, I'm pretty sure. Ã, I've even tried placing a square of this walkable area inside the working one and it breaks it. Ã, Any area other than 1 seems unwalkable.
Also, I seem to be able to walk through an unwalkable area if I click a walkable area on the other side of it. Ã, Should this happen anyway?
Title: Re: Walkable areas are unwalkable
Post by: Ishmael on Thu 14/07/2005 17:21:28
Sounds... Fishy. You shouldn't be able to walk over any unwalkable area, unless you're using a MoveCharacterDirect command...
Title: Re: Walkable areas are unwalkable
Post by: CodeJunkie on Thu 14/07/2005 17:24:11
I don't think I'm using MoveCharacterDirect commands for just normal walking
Title: Re: Walkable areas are unwalkable
Post by: monkey0506 on Thu 14/07/2005 17:28:51
You may want to check that out.  It's possible that somewhere you may have a command to that effect.  Otherwise...I quit.  I give up.
Title: Re: Walkable areas are unwalkable
Post by: CodeJunkie on Thu 14/07/2005 17:31:08
I'm such a loser:

if(GetWalkableAreaAt(mouse.x, mouse.y) == 1) { //walk
  MoveCharacter(0, mouse.x, mouse.y);
}

Sorry, about that, it's my first game where I've altered the main mouse click scripts.
Title: Re: Walkable areas are unwalkable
Post by: Gilbert on Fri 15/07/2005 02:57:22
remove those if..., otherwise the character can only be walked if the destination is area 1. Just:
MoveCharacter(0, mouse.x, mouse.y);

Also, if your game has scrolling rooms, change it to:
MoveCharacter(0, mouse.x+GetViewportX(), mouse.y+GetViewportY());