This component controls the movement of one or more entities and implements the related effects. More...
Public Member Functions | |
HandleMove (number FrameTime) | |
This is the main method of this component: [...]. More... | |
Public Member Functions inherited from ComponentBaseT | |
any | get (string var_name) |
Returns the value of an attribute (a member variable) of this class. More... | |
set (string var_name, any new_value) | |
Sets an attribute (a member variable) of this class to a new value. More... | |
string | GetExtraMessage (string var_name) |
Returns the result of VarBaseT::GetExtraMessage() for the given member variable. More... | |
interpolate (string var_name, number start_value, number end_value, number time) | |
Schedules a value for interpolation between a start and end value over a given period of time. More... | |
EntityT | GetEntity () |
Returns the entity that this component is a part of (or nil if the component is currently "stand-alone", not a part of any entity). More... | |
InitClientApprox (string VarName) | |
Registers the given attribute (a member variable) of this class for interpolation over client frames in order to bridge the larger intervals between server frames. More... | |
OnInit () | |
This method is called for each component of each entity as the last step of initializing a newly loaded map. More... | |
OnClientFrame (number t) | |
This method is called for each component of each entity before the client renders the next frame. More... | |
Public Attributes | |
number | moveDuration |
The time in seconds that it takes to move each part from one endpoint to the other. More... | |
number | destActivated |
Describes the mover's behavior when it is activated at the "dest" position. More... | |
number | destTimeout |
The timeout in seconds after which the parts move back to their "home" position. More... | |
number | otherEntities |
Describes the mover's behavior regarding other entities. More... | |
number | trajFunc |
Describes the base function that is used to compute the mover's trajectory. More... | |
number | trajExp |
The exponent that is applied to trajFunc . More... | |
This component controls the movement of one or more entities and implements the related effects.
The component can handle a single entity, e.g. a moving platform or a lift, or several entities that act together as a team, e.g. the wings of a door.
This component works in concert with a Script component, which must be present in the same entity. The Mover component queries the Script component for the desired spatial transformation of each team member, and notifies it whenever the movement is blocked by another entity (e.g. a player). It also implements the appropriate effects on other entities, e.g. their being pushed by moving parts, or their riding on top of them.
Note that the variables of this class (also referred to as "Public Attributes" or "Member Data") must be used with the get() and set() methods at this time – see get() and set() for details.
If you would like to create a new component of this type explicitly (those defined in the CaWE Map Editor are instantiated automatically), use WorldT::new():
HandleMove | ( | number | FrameTime | ) |
This is the main method of this component: [...].
FrameTime | The time across which the parts are moved. |
number destActivated |
Describes the mover's behavior when it is activated at the "dest" position.
Value | Description |
---|---|
0 | move home |
1 | reset timeout |
2 | ignore |
int
number destTimeout |
The timeout in seconds after which the parts move back to their "home" position.
A negative value to disables the timeout.
float
number moveDuration |
The time in seconds that it takes to move each part from one endpoint to the other.
float
number otherEntities |
Describes the mover's behavior regarding other entities.
Value | Description |
---|---|
0 | ignore |
1 | cannot push |
2 | can push |
3 | can force-push |
int
number trajExp |
The exponent that is applied to trajFunc
.
float
number trajFunc |
Describes the base function that is used to compute the mover's trajectory.
Value | Description |
---|---|
0 | linear |
1 | sine |
int