TDM Movers

From The DarkMod Wiki
Revision as of 07:36, 22 June 2008 by Greebo (talk | contribs) (New page: For The Dark Mod, we extended the existing idMover class by a set of classes specifically designed for creating maps in the medieval steampunk setting. Apart from elevators, most movers in...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

For The Dark Mod, we extended the existing idMover class by a set of classes specifically designed for creating maps in the medieval steampunk setting. Apart from elevators, most movers in TDM are two-state movers, meaning that they can be either in "open" or "closed" state. The class hierarchy is depicted here (I use the internal C++ class names here):


TDM Movers Class Hierarchy.png


There are two base classes: BinaryFrobMover and MultiStateMover, which both build on top of the vanilla Doom 3 idMover class and provides all the methods needed to make all kinds of two- or multistate movers.

Each following section is dedicated to a certain subclass, listing information about spawnargs, script events as well as the C++ methods. This article is going to be long and should probably be split into pieces once the rough shape is formed.

CBinaryFrobMover

The corresponding entityDef is atdm:mover_binarymover_base

This is the base class for all kind of TDM movers like doors, levers and buttons. The class is designed for movers with two final states, namely open and closed. "Open" and "closed" are abstract definitions and just refer to the "one" and the "other" state of the mover. All movers are considered to spawn "closed", until specifically specified otherwise.

The class provides a set of virtual C++ methods which can be specialised by their subclasses to implement the correct behaviour. It also supports a number if spawnargs which can be used to allow for easy customisation right in the editor.

Spawnargs

Script Events

C++ Methods and Events