Welcome to the Creatures Wiki! Log in and join the community.

VELO

From Creatures Wiki
Jump to navigation Jump to search
VELO.png

VELO is a CAOS command used to set the velocity of an agent. Typically, this works best if the agent in question has physics attributes set, like ELAS, ACCG, FRIC and AERO.

It can be used in the creation of an object, like a seed, to make it 'jump' away from the parent plant. It can be used in a timer script to give a consistent hopping motion, interspersed with anim and over commands (see Basic_interactive_land_critter_script#Critter_timer). It can also be used in a push or hit script to give a visual feedback to the player that the agent has been interacted with. This can be combined with RAND to give interesting effects.

Usage[edit]

Syntax: VELO x_velocity(float) y_velocity(float)

Sets velocity, measured in pixels per tick.

Examples[edit]

VELO 0 0

Stops movement.

VELO RAND -2 2 0

Gives a small random velocity in the X direction (between -2 and 2) and does not move the object in the Y direction (0).

VELO 0 RAND -5 -10

The object takes a small jump directly upwards (between -5 and -10 strength).

VELO RAND -5 5 RAND -5 5

Gives a small random velocity - the object can move left (-5) or right (5), and up (-5) or down (5).

VELO 6 -2

Moves slightly upwards (-2, to get it off the ground) and towards the right (6) ->

VELO -6 -2

Moves slightly upwards (-2, to get it off the ground) and towards the left (-6) <-

See also[edit]