walk behind problem

Started by Matex, Wed 13/06/2007 11:26:21

Previous topic - Next topic

Matex

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

Khris

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.

Matex

um, how do i make the walkable area disabled?

Khris

In the room interaction "player enters screen (before fadein)", add
Code: ags
  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
Code: ags
  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)

Matex


SMF spam blocked by CleanTalk