Make your own free website on Tripod.com

A.G.S. v2.21
Text Script Commands Manual by Spyros

Main Page
Character

Cursor
Dialogue
Display
File
Game
GUI
Inventory
Music,Sound,Flic

Palette
Object

Room
Screen
String

 

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.
Example:
NewRoom(5);

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(5,267,111);

ResetRoom (int room_number)
Discards all the data that the engine has in memory about when the player last visited ROOM_NUMBER, and resets it as if they'd never been there. The next time the player goes to that room, all the objects and scripts will be in their initial state (as set up in roomedit), and not how they were when the player left the room. The "First time enters screen" event will be run when they enter this room again.
This function is useful if you want to have a "View intro" option to allow the player to watch an intro again - this function can reset all the
objects in the intro rooms to their starting positions.
NOTE: You cannot reset the current room (ie. the room that the player is in).
Example:
ResetRoom(2);

GLOBAL VARIABLES

character[CHARID].prevroom
The room it was in before this one
Example:
character9NAME0.prevroom=(12);

character[CHARID].room
Which room the character is in
Example:
character9NAME0.room=(12);