Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Mon 22/09/2003 19:02:02

Title: Help with player stuck in a room
Post by: on Mon 22/09/2003 19:02:02
Hi,

sorry, i know this might be a bit basic, but i have done a search and read the ags help file and i cant seem to find out whats happenin.

i made a new game and from the first room i go into an elevator and are transported into a new room, but when i start in the new room, the player doesnt go str8 to a walkable area so i cant move him.
i know how to set the co-ordinates of the room he starts in, but not all the other rooms, and i dont really understand the scripting at all.

Thanks in advance for any replies.
Title: Re:Help with player stuck in a room
Post by: Privateer Puddin' on Mon 22/09/2003 19:07:22
NewRoomEx (int room_number, int x, int y)

Identical to NewRoom, except that the player character is placed at co-ordinates (X,Y) in the new room.
Example:

NewRoomEx(4,100,50);

will move the player character to room 4 and also place him at coordinates 100,50.
Title: Re:Help with player stuck in a room
Post by: Isegrim on Mon 22/09/2003 19:17:10
Or: In the new room, under "Player enters screen, after fadein" add the action "execute script", and write "MoveToWalkableArea(EGO); " (or any other char-ID instead of EGO)
Makes sure he always lands on a walkable and you needn't always measure out your walkables.
Title: Re:Help with player stuck in a room
Post by: on Mon 22/09/2003 19:23:59
Thanks!