CMultiStateMover: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
(New page: == CMultiStateMover == The corresponding entityDefs are '''atdm:mover_multistate''' and '''atdm:mover_elevator'''. This mover supports several target positions. The primary "clients" of t...)
 
m (categorised)
Line 24: Line 24:
The CMultiStateMover works closely together with the [[CMultiStateMoverPosition]] and [[CMultiStateMoverButton]] classes. There is a lot of communication going on between these, to handle the AAS obstacle stuff and to let AI know which buttons to use at which elevator station.
The CMultiStateMover works closely together with the [[CMultiStateMoverPosition]] and [[CMultiStateMoverButton]] classes. There is a lot of communication going on between these, to handle the AAS obstacle stuff and to let AI know which buttons to use at which elevator station.


{{coding}} {{editing}}
{{sdk}} {{editing}}

Revision as of 07:43, 30 June 2008

CMultiStateMover

The corresponding entityDefs are atdm:mover_multistate and atdm:mover_elevator.

This mover supports several target positions. The primary "clients" of this class are elevators, of course.

The positions are defined by so-called CMultiStateMoverPosition entities, which are placed by the mapper. It also takes care of triggering/activating the func_aas_obstacle entities, which are needed for the AI to pathfind on elevator stations.

The triggering ("activating") entity needs to carry a "position" spawnarg so that the elevator knows where to move to.

Spawnargs

  • forward_direction (vector) This defines the "forward direction" of this elevator (default is '0 0 1', i.e. upwards). This is needed to control the gear direction of any attached movers.
  • control_gear_direction (1/0) Set this to 1 to let this mover control the direction of targetted rotaters, depending on whether the mover is moving forward/backwards.
  • trigger_on_reached (1/0) Set to 1 if the mover should trigger its targets when a position is reached.
  • trigger_on_leave (1/0) Set to 1 if the mover should trigger its targets when leaving from a position.
  • move_speed (float) is inherited from idMover. Defines the world units per second to move between floors.
  • move_time (float) is inherited from idMover. Don't use this, it makes the mover slower when it's nearer at its goal.

Script Events

  • <no special event>

C++ Methods and Events

The CMultiStateMover works closely together with the CMultiStateMoverPosition and CMultiStateMoverButton classes. There is a lot of communication going on between these, to handle the AAS obstacle stuff and to let AI know which buttons to use at which elevator station.