Debug (int command, int data)
This function provides all the debug services in the system. It performs
various different tasks, depending on the value of the COMMAND parameter.
If debug mode is off, then this function does nothing. This allows you to
leave your script unaltered when you distribute your game, so you just have
to turn off debug mode in the AGS Editor.
The DATA parameter depends on the command - pass 0 if it is not used.
All the valid values for the COMMAND parameter are listed below along with
what they do:
0 All inventory - gives the current player character one of every
inventory item. This is useful for testing so that you don't have to
go and pick up items every time you test part of the game where they
are required.
1 Display interpreter version - the engine will display its version
number and build date.
2 Walkable from here - fills in the parts of the screen where the player
can walk from their current location. This is useful if you think the
path-finder is not working properly. All walkable areas are drawn in
their respective colours, but with blocking areas at characters feet
removed.
3 Teleport - displays a dialog box asking for what room you want to go
to, and then calls ChangeRoom to teleport you there. Useful for skipping
parts of the game or going to a specific point to test something.
4 Show FPS - toggles whether the current frames per second is displayed
on the screen. Pass DATA as 1 to turn this on, 0 to turn it off.
See Also: Debugging features
|