$CLEANTESTAREA

From HEWIKI
Jump to: navigation, search

Contents

The sole current function of the $CLEANTESTAREA system node is to provide a method that returns the AreaID of the "clean test area" for your game. Essentially this is a special area that is devoid of all objects, except perhaps a single walk surface. Hence it is "clean" and a great place to log into play instances for the purposes of 'sandbox' style experimentation. The character selection process in HeroEngine exposes an override checkbox to log into your specified clean test area instead of where your character logged off at (although you may have overridden this in your implementation). By default, this is set to the HeroEngine_StartingArea. However, it is likely you may clutter that area in the first few days in which you have access to your server, so you will eventually want to create a new area with only a test grid heightmap.

What problem(s) does this solve?


Adding game-specific functionality

As a required class/script, it is not permissible to make changes to the _cleantestareaClassMethods script. Instead, extension/overriding the script is accomplished by the creation of a game-specific class (and class methods script) that is GLOMmed onto the CLEANTESTAREA prototype.

Create a game-specific class

Using the DOM Editor create a new (server|client) class. Our recommendation is that you use a class name that incorporates the _cleantestarea as a suffix to the name (ex. HJ_cleantestarea), this makes it easier to locate the pair of classes (the required script prefixed in _cleantestarea and your game-specific class).

Once you have created the game-specific class, create a new client class methods script for that class.

Adding a game-specific class

Adding your game-specific class to the CLEANTESTAREA prototype is achieved using the System Node Configuration GUI or the CLI server command \mpac or client |mpac in the Console Panel. The System Node Configuration GUI is the preferred method because it handles the communication to update any instantiations of a system node to reflect the changes you have made.

Using the System Node Configuration GUI

UtilitiesInterfaceConfigureSystemNodes.jpg

Opening the System Node Configuration GUI requires you to access the hidden Utilities Interface toolbox, located in the top left corner of the render window with ctrl-shift-click (or press F5), which will open the Interface. On the Tools tab within the menu, is an option to open the System Nodes Configuration GUI.

See also: Adapting Clean Engine



Using the CLI

It is important to recognize that modification of the prototype from which a system node is instantiated will not update any instantiations that have already been made in various local GOMs. That means your changes will not take effect until the area (in the case of server system nodes) restarts, or the client (in the case of client system nodes), restarts.

Adding a class to a prototype is done via the CLI command Modify Prototype Add Class(MPAC).

Server: \mpac CLEANTESTAREA, hj_cleantestarea;
Client: |mpac CLEANTESTAREA, hj_cleantestarea;


Specify a game-specific area to use for clean testing

It is often useful to have a test area with minimal assets/textures to facilitate quick loading into the area and no/minimal potential sources of interference to your testing. By default, Clean Engine uses play instances of the Clean Engine starting area for this purpose. Implementing the HE_getCleanTestArea method in your game-specific class methods script for the $CLEANTEST system node allows you to override the default area with one you specify.

method HE_getCleanTestArea() as ID
// Used by $CLEANTESTAREA
//
// Return the ID of the area you want to be used as your clean test area.
  return 0
.

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox