fn_getMobileRespawns
This commit is contained in:
parent
fec002f37b
commit
b70e3505d5
|
@ -2,26 +2,26 @@
|
|||
File: fn_getMobileRespawns.sqf
|
||||
Author: KP Liberation Dev Team - https://github.com/KillahPotatoes
|
||||
Date: 2019-11-25
|
||||
Last Update: 2019-11-25
|
||||
Last Update: 2019-12-05
|
||||
License: MIT License - http://www.opensource.org/licenses/MIT
|
||||
|
||||
Description:
|
||||
No description added yet.
|
||||
Gets all mobile respawn vehicles sorted by their positions X value.
|
||||
|
||||
Parameter(s):
|
||||
_localVariable - Description [DATATYPE, defaults to DEFAULTVALUE]
|
||||
NONE
|
||||
|
||||
Returns:
|
||||
Function reached the end [BOOL]
|
||||
Mobile respawns [ARRAY]
|
||||
*/
|
||||
// TODO
|
||||
private _respawn_trucks_unsorted = vehicles select {
|
||||
(typeof _x == Respawn_truck_typename || typeof _x == huron_typename ) &&
|
||||
_x distance2d startbase > 500 &&
|
||||
!surfaceIsWater (getpos _x) &&
|
||||
(isTouchingGround _x || {5 > ((getPos _x) select 2)}) &&
|
||||
alive _x &&
|
||||
speed _x < 5
|
||||
|
||||
private _respawn_trucks = vehicles select {
|
||||
(typeOf _x) in [Respawn_truck_typename, huron_typename] &&
|
||||
{alive _x} &&
|
||||
{_x distance2d startbase > 500} &&
|
||||
{abs (speed _x) < 5} &&
|
||||
{(isTouchingGround _x || {5 > ((getPos _x) select 2)})} &&
|
||||
{!surfaceIsWater (getPos _x)}
|
||||
};
|
||||
|
||||
[_respawn_trucks_unsorted, [], {(getpos _x) select 0}, 'ASCEND'] call BIS_fnc_sortBy
|
||||
[_respawn_trucks, [], {(getPos _x) select 0}, 'ASCEND'] call BIS_fnc_sortBy
|
||||
|
|
Loading…
Reference in New Issue