Changing rooms. [SOLVED]

Started by Edin10, Mon 14/02/2005 10:37:34

Previous topic - Next topic

Edin10

I dont know how to switch from one room to another, can anybody help me with this?

I understand that this is a very basic question but I had a look and couldn't find this. I'm sorry if this has either been said before or if i keep missing it in the tutorial.


Thanks, and sorry if this has been said.
--Ollie

Neil Dnuma

Before any "RTFM" shows up...:
Press 'F1' in AGS and search out the functions "NewRoom" and "NewRoomEx" :)

Edin10

sorry, what I meant was how do I make it so that my character can walk from one room to another.

Edin10

#3
thanks, Sorry, double post. I'm making a right mess of all thisÃ,  :-[.

_____________________
NewRoom (int room_number)

Changes the room the player is in. This command unloads the current room from memory and loads instead ROOMx.CRM, where X is room_number.
IMPORTANT: This command does not change the room immediately; instead, it will perform the actual room change once your script function has finished (This is to avoid problems with unloading the script while it is still running). This means that you should not use any other commands which rely on the new room (object positionings, and so on) after this command within the same function.

To move a non-player character to a different room, use NewRoomNPC.

Example:

NewRoom (4);

will move the player character to room 4.

-------------

Where exactly do i add these functions? I dont understand.

Sewer Agent

To make your character switch from one room to the other go to the Interactions editor in the room settings. (It's the big I next to the import image button.). Then add an action under "Walk off left screen edge" or "Walk off right screen edge" and select "Player-Go to a different room" (it's near the bottom of the list.). Then put in the room number and it should work (make sure you have moved those yellow lines to show the edges of the room.).

TerranRich

Read the BFAQ. Please. It explains fully the "Where do I add functions" question. It's simply a matter of common sense. When do you want your character to switch rooms? Perhaps when he walks off the edge of the screen. Then put that function in the "walks off edge of screen" room interaction. If you don't know what a room interaction is, then please, READ through the manual FULLY before asking ANY questions here. It's one of our biggest rules here.
Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk