BIS fnc moveToRespawnPosition: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "= <code>([^<{]+)<\/code>" to "= <sqf>$1</sqf>")
 
(33 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|arg= local


|1.00|= Game version
|gr1= Respawn
____________________________________________________________________________________________


| <pre>/*
|descr= Move given unit to given respawn position. Units moved to height <nowiki>>=</nowiki> 30m will start on parachute. Position [0,0,0] is blacklisted. This function must be executed where unit to be moved is [[Multiplayer Scripting#Locality|local]].


Description:
|s1= [unit, position, canBeDead] call [[BIS_fnc_moveToRespawnPosition]]
Move a unit to the respawn position.


Parameter(s):
|p1= unit: [[Object]] - unit to move
0: OBJECT
1:
STRING - move to marker position
OBJECT - move inside a vehicle (when seats are empty and not locked) or around it
ARRAY - move to precise [X,Y,Z] position


Returns:
|p2= position: [[Object]], [[Group]], [[String]] or [[Array]]
BOOL
* [[Object]] or [[Group]] - Object or Group to move unit to. Move to the object position or inside an object if the object is a vehicle, or if group or unit is in vehicle and there is an empty seat
*/
* [[String]] - Marker to move unit to. Marker size will be used for random placement area and marker direction for unit direction
* [[Array]] - Precise [[Position#PositionAGL|PositionAGL]] to move unit to. [x,y] array will be converted to [x,y,0]


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p3= canBeDead: [[Boolean]] - (Optional, default [[true]]) whether or not dead are allowed:
____________________________________________________________________________________________
* [[true]] - moved unit and/or object to which unit is moved can be dead
* [[false]] - both moved unit and vehicle or unit at position (if any) must be alive


| <!-- [] call [[BIS_fnc_moveToRespawnPosition]]; --> |= Syntax
|r1= [[Boolean]] - [[true]]: move succeeded, [[false]]: move failed


|p1= |= Parameter 1
|x1= <sqf>[player, "SpawnMarker1"] call BIS_fnc_moveToRespawnPosition;</sqf>
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso=
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Respawn|{{uc:moveToRespawnPosition}}]]
[[Category:Functions|{{uc:moveToRespawnPosition}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:moveToRespawnPosition}}]]

Latest revision as of 18:00, 13 July 2022

Hover & click on the images for description

Description

Description:
Move given unit to given respawn position. Units moved to height >= 30m will start on parachute. Position [0,0,0] is blacklisted. This function must be executed where unit to be moved is local.
Execution:
call
Groups:
Respawn

Syntax

Syntax:
[unit, position, canBeDead] call BIS_fnc_moveToRespawnPosition
Parameters:
unit: Object - unit to move
position: Object, Group, String or Array
  • Object or Group - Object or Group to move unit to. Move to the object position or inside an object if the object is a vehicle, or if group or unit is in vehicle and there is an empty seat
  • String - Marker to move unit to. Marker size will be used for random placement area and marker direction for unit direction
  • Array - Precise PositionAGL to move unit to. [x,y] array will be converted to [x,y,0]
canBeDead: Boolean - (Optional, default true) whether or not dead are allowed:
  • true - moved unit and/or object to which unit is moved can be dead
  • false - both moved unit and vehicle or unit at position (if any) must be alive
Return Value:
Boolean - true: move succeeded, false: move failed

Examples

Example 1:
[player, "SpawnMarker1"] call BIS_fnc_moveToRespawnPosition;

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