Location:

All module instances need a location property. This is used to place objects on a map, and also to determine which objects are next to, or inside, each other. The location property must say which map an object is placed, and its absolute location on that map. An alternative to this map location is to have a reference to another object - for objects that are held within another.

e.g. A Base object will have an absolute map location, an Agent inside that base will not have the same location, but a reference to the Base.

Functions

Load

Load will read all a module's instance data from persistant storage.

Save

Save will write all a module's instance data to persistant storage.

NewInstance

This is designed to create and initialise a new object within a module.

FreeInstance

When an object inside a module is no longer required, it and its data can be freed using this call.

DoCommand

The module will perform certain actions during the game, this function is the entry point for the Game Engine to call them.

GetData

This will request a data list of a particular type from an object held within the module. The list is read-only unless locked by a call to LockData.

LockData

The Game Engine will request read-write access to data from an object within a module using this call. The data list that is returned will be locked from further access until a call to UnlockData is made.

UnlockData

This is called to update the data list that has been passed to the Game Engine, and free the synchronisation lock held that prevents modification.

Powered by WordPress