setVehiclePosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(wip, paused, need coffee)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Moves the object to a random position.
| 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'' |= Description
____________________________________________________________________________________________
 
| object '''setVehiclePosition''' [position, markers, placement, special] |= Syntax
 
|p1= object: [[Object]] |= Parameter 1
|p2= [position, markers, placement, special]: [[Array]] |= Parameter 1


Uses either the position that's defined in the first array, or one of the marker positions from the markers array.
|p3= position: [[Position]], [[Position2D]] or [[Object]] - Desired placement position |= Parameter 3


The object is placed inside a circle with this position as its center and placement as its radius. |= Description
|p4= markers: [[Array]] - If the markers array contains several marker names, the position of a random one is used. Otherwise, the given position is used.|= Parameter 4
____________________________________________________________________________________________
 
|p5= placement: [[Number]] - The vehicle is placed inside a circle with given position as center and placement as its radius|= Parameter 5


| object '''setVehiclePosition''' [position, markers, placement] |= Syntax
|p6= special (Optional): [[String]] - <tt>"NONE"</tt>, <tt>"FLY"</tt>, <tt>"FORM"</tt>, <tt>"CAN_COLLIDE"</tt>. <tt>"CAN_COLLIDE"</tt> creates the vehicle exactly where asked, not checking if others objects can cross its 3D model. Default: <tt>"NONE"</tt>|= Parameter 6


|p1= object: [[Object]] |= Parameter 1
|p2= [position, markers, placement]: [[Array]] |= Parameter 2
|p3= position: [[Array]] - format [[Position]] |= Parameter 3
|p4= markers: [[Array]] - format [[Position]] |= Parameter 4
|p5= placement: [[Number]] |= Parameter 5


| [[Nothing]] |= Return value
| [[Nothing]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <code>[[player]] '''setVehiclePosition''' <nowiki>[[1000,2000], ["Pos1","Pos2","Pos3"], 0]</nowiki></code> Will place the player at either [1000,2000], or one of the three markers positions.|= Example 1
|x1= <code>[[player]] '''setVehiclePosition''' <nowiki>[[1000,2000], ["Pos1","Pos2","Pos3"], 0, "CAN_COLLIDE"]</nowiki></code> Will place the player at either [1000,2000], or one of the three markers positions.|= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 10:09, 22 June 2015

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

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.

Additional Information

See also:
See also needed

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

Notes

Bottom Section