Page tree
Skip to end of metadata
Go to start of metadata




Introduced in

Version:1.30

Description

Description:

Moves a unit and prevents them from returning to formation after reaching their destination. It is used as a replacement for the doMove command, when you do not want the unit to return to the formation after completing the move.

Syntax

Syntax:[object, destination, stop_in_combat, speed] call fn_vbs_doMoveEx
Parameters:
  • object: Object - The unit or vehicle to move.
  • destination: Position-2 - Position to move to. If nil is passed, the unit / vehicle return to formation.
  • stop_in_combat: Boolean - If true, the unit / vehicle stops, once the destination is reached, even during combat. If false, the function aborts, once combat starts (the unit / vehicle is set to combat or stealth behavior), and the default combat AI takes over) (optional, default: false).
  • speed: Number - Speed (km/h) the AI should move at. If set to 0, the AI chooses the speed. Use 1.5 to make humans walk (optional, default: 0),
Return Value:Nothing

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
Give unit1 a movement order: 
[unit1, getPos car] call fn_vbs_doMoveEx
Cancel movement order and return to formation: 
[unit1, nil] call fn_vbs_doMoveEx

Additional Information

See also: 
Multiplayer: 
Problems: 

Notes