setVehiclePosition: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) (wip, paused, need coffee) |
Killzone Kid (talk | contribs) (see also) |
||
Line 27: | Line 27: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <code>[[player]] | |x1= <code>[[player]] [[setVehiclePosition]] <nowiki>[</nowiki>[1000,2000], ["Pos1","Pos2","Pos3"], 0, "CAN_COLLIDE"];</code> Will place the player at either [1000,2000], or one of the three markers positions.|= Example 1 | ||
|x2= <code>heli [[setVehiclePosition]] <nowiki>[</nowiki>[[player]], [], 0, "FLY"];</nowiki></code>|= Example 2 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| | | [[setPos]], [[createUnit]], [[setPosASL]], [[setPosWorld]], [[setPosWorld]], [[createVehicle]]|= See also | ||
}} | }} |
Revision as of 10:58, 22 June 2015
Description
- Description:
- Moves the object to a given position (same as createVehicle placement algorithm). Uses either the position that's defined by the position param, or one of the marker positions from the markers array. The object is placed inside a circle with position as its center and placement as its radius. The type of placement could also be controlled with special
- Groups:
- Uncategorised
Syntax
- Syntax:
- object setVehiclePosition [position, markers, placement, special]
- Parameters:
- object: Object
- [position, markers, placement, special]: Array
- position: Position, Position2D or Object - Desired placement position
- markers: Array - If the markers array contains several marker names, the position of a random one is used. Otherwise, the given position is used.
- placement: Number - The vehicle is placed inside a circle with given position as center and placement as its radius
- special (Optional): String - "NONE", "FLY", "FORM", "CAN_COLLIDE". "CAN_COLLIDE" creates the vehicle exactly where asked, not checking if others objects can cross its 3D model. Default: "NONE"
- Return Value:
- Nothing
Examples
- Example 1:
player setVehiclePosition [[1000,2000], ["Pos1","Pos2","Pos3"], 0, "CAN_COLLIDE"];
Will place the player at either [1000,2000], or one of the three markers positions.- Example 2:
heli setVehiclePosition [player, [], 0, "FLY"];</nowiki>
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note