CAOS-Programmierung: Befehlsgruppen: Motion
<< Befehlsgruppen | Inhaltsverzeichnis >>
Motion
ACCG (command) acceleration (float)
Set acceleration due to gravity in pixels per tick squared.
ACCG (float)
Returns target's acceleration due to gravity in pixels per tick squared.
ADMP (command) damping_factor (float)
Damp angular velocity by this much each tick. The value is from 0.0 to 1.0 where 0.0 means no damping, 1.0 maximum.
ADMP (float)
Get current angular damping. The value is from 0.0 to 1.0 where 0.0 means no damping, 1.0 maximum.
AERO (command) aerodynamics (integer)
Set aerodynamic factor as a percentage. The velocity is reduced by this factor each tick.
AERO (integer)
Returns aerodynamic factor as a percentage.
ANGL (float) x (float) y (float)
Gets the angle (as a fraction of a circle) from TARG's position to the position specified.
AVEL (command) amount_in_fraction_of_whole_circle (float)
Set angular velocity.
AVEL (float)
Get current angular velocity.
ELAS (command) elasticity (integer)
Set the elasticity percentage. An agent with elasticity 100 will bounce perfectly, one with elasticity 0 won't bounce at all.
ELAS (integer)
Return the elasticity percentage.
FALL (integer)
Returns 1 if target is moving under the influence of gravity, or 0 if it is at rest.
FDMP (command) damping_factor (float)
Damp forward velocity by this much each tick. The value is from 0.0 to 1.0 where 0.0 means no damping, 1.0 maximum.
FDMP (float)
Get current forwards damping. The value is from 0.0 to 1.0 where 0.0 means no damping, 1.0 maximum.
FLTO (command) screen_x (float) screen_y (float)
Move the top left corner of target to either the given screen coordinates, or the given coordinates relative to the agent it is FREL to. Useful for floating agents.
FREL (command) relative (agent)
Sets an agent for target to float relative to. To make target actually float, you need to set attribute Floatable as well. Set FREL to NULL to make the target float relative to the main camera - this is the default. Use FLTO to set the relative position of the top left corner of the floating agent to the top left corner of the agent it is floating relative to.
FRIC (command) friction (integer)
Set physics friction percentage, normally from 0 to 100. Speed is lost by this amount when an agent slides along the floor.
FRIC (integer)
Return physics friction percentage.
FVEL (command) amount_in_pixels (float)
Set forwards velocity.
FVEL (float)
Get current forwards velocity.
MOVS (integer)
Returns the movement status of the target. 0 Autonomous 1 Mouse driven 2 Floating 3 In vehicle 4 Carried
MVBY (command) delta_x (float) delta_y (float)
Move the target agent by relative distances, which can be negative or positive.
MVSF (command) x (float) y (float)
Move the target agent into a safe map location somewhere in the vicinity of x, y. Only works on autonomous agents - see MOVS. Works like a safe MVFT for creatures.
MVTO (command) x (float) y (float)
Move the top left corner of the target agent to the given world coordinates. Use MVFT instead to move creatures.
OBST (float) direction (integer)
Returns the distance from the agent to the nearest wall that it might collide with in the given direction. Directions are LEFT, RGHT, _UP_, or DOWN. If the distance to the collsion is greater than RNGE then a very large number is returned.
RELX (float) first (agent) second (agent)
Returns the relative X distance of the centre point of the second agent from the centre point of the first.
RELY (float) first (agent) second (agent)
Returns the relative Y distance of the centre point of the second agent from the centre point of the first.
ROTN (command) no_of_sprites_for_each_rotation (float) no_of_rotations (float)
For automatic change of sprite when the agent rotates the engine assumes that the sprite file is stored with all the sprites for one rotation together starting with pointing north.
SDMP (command) damping_factor (float)
Damp sideways velocity by this much each tick. The value is from 0.0 to 1.0 where 0.0 means no damping, 1.0 maximum.
SDMP (float)
Get current sideways damping. The value is from 0.0 to 1.0 where 0.0 means no damping, 1.0 maximum.
SPIN (command) amount_in_fraction_of_whole_circle (float)
Rotate to a particular facing.
SPIN (float)
Get current facing angle.
SVEL (command) amount_in_pixels (float)
Set sideways velocity.
SVEL (float)
Get current sideways velocity.
TMVB (integer) delta_x (float) delta_y (float)
Similar to TMVT only tests a MVBY.
TMVF (integer) x (float) y (float)
Test if a creature could move it's down foot to position x,y.
TMVT (integer) x (float) y (float)
Test if target can move to the given location and still lie validly within the room system. Returns 1 if it can, 0 if it can't.
VARC (command) view_arc_size (float)
[not implemented yet]
VARC (float)
[not implemented yet]
VECX (float) angle (float)
Returns a normalised vector for the given angle (X coordinate).
VECY (float) angle (float)
Returns a normalised vector for the given angle (Y coordinate).
VELO (command) x_velocity (float) y_velocity (float)
Set velocity, measured in pixels per tick.
VELX (variable)
Horizontal velocity in pixels per tick - floating point.
VELY (variable)
Vertical velocity in pixels per tick - floating point.
WALL (integer)
Returns the direction of the last wall the agent collided with. Directions are LEFT, RGHT, _UP_, or DOWN.
<< Befehlsgruppen | Inhaltsverzeichnis >>