Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Matex on Wed 13/06/2007 11:26:21

Title: walk behind problem
Post by: Matex on Wed 13/06/2007 11:26:21
my character in in a cave and i want the path to be blocked by rubble.
ive drawn rubble and made it into an object but the character just walks behind it.
i cant script or anything its my first game in my nineth room.
I know there is probebly a simple answer but i dont know it
and i also need it so that when a certain item is used on the rubble it dissapears and you can walk through
Title: Re: walk behind problem
Post by: Khris on Wed 13/06/2007 11:44:16
You could make both your main character and the rubble object solid. Search the helpfile for "solid". And look up Object.BlockingWidth/Height.

An alternative is to use a second, disabled walkable area which is activeted once the rubble is removed.
Title: Re: walk behind problem
Post by: Matex on Sat 16/06/2007 04:52:13
um, how do i make the walkable area disabled?
Title: Re: walk behind problem
Post by: Khris on Sat 16/06/2007 13:17:24
In the room interaction "player enters screen (before fadein)", add
  if (oRubble.Visible) RemoveWalkableArea(2);
(set the rubble object's Script O-Name to "RUBBLE")

In the rubble object's interaction "Use inv on", put
  if (player.ActiveInventory==iItem) {
    oRubble.Visible=false;
    RestoreWalkableArea(2);
    player.Say("The rubble is gone now!");
  }
  player.Say("Why would I use that on the rubble?");

(replace "iItem" with the name of the inv item)
Title: Re: walk behind problem
Post by: Matex on Sat 14/07/2007 06:40:49
thanx
Soz late reply