(Formerly known as MoveToWalkableArea, which is now obsolete)
Character.PlaceOnWalkableArea()
Places the character in the nearest walkable area to its current location.
If the character is already on a walkable area, nothing happens.
This is useful for example in the Player Enters Room event of a room, to
make sure the character can move if a ChangeRoom with co-ordinates has been issued to get there.
You could also use this in on_event for eEventEnterRoomBeforeFadein to use whenever a
player enters a room.
Example:
cEgo.x = Random(320);
cEgo.y = Random(200);
cEgo.PlaceOnWalkableArea();
will move character EGO to a random position but make sure that he is on a walkable area.
|