mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
35 lines
787 B
Plaintext
35 lines
787 B
Plaintext
/*
|
|
* Author: commy2
|
|
* teleports a unit to a rallypoint
|
|
*
|
|
* Arguments:
|
|
* 0: unit <OBJECT>
|
|
* 1: side? <OBJECT>
|
|
* 2: teleport to base <BOOLEAN>
|
|
*
|
|
* Return Value:
|
|
* Nothing
|
|
*
|
|
* Example:
|
|
* [,,] call ACE_Respawn_fnc_teleportToRallypoint;
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
PARAMS_3(_unit,_side,_rallypoint);
|
|
|
|
private ["_toBase"];
|
|
|
|
// rallypoint names are defined in CfgVehicles.hpp
|
|
|
|
//IGNORE_PRIVATE_WARNING("_Base")
|
|
_toBase = _rallypoint find "_Base" != -1;
|
|
|
|
_rallypoint = missionNamespace getVariable [_rallypoint, objNull],
|
|
|
|
if (isNull _rallypoint) exitWith {};
|
|
|
|
_unit setPosASL getPosASL _rallypoint;
|
|
[[localize "STR_ACE_Respawn_TeleportedToRallypoint", localize "STR_ACE_Respawn_TeleportedToBase"] select _toBase] call EFUNC(common,displayTextStructured);
|