Search the Community
Showing results for tags 'playable area'.
Found 1 result
-
multiplayer How to make my playable area lighter for server?
thy_ posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey, I help some help to improve this: The script does: for dedicated and hosted servers, a multiplayer playable area control based on a trigger area (with Y, X, Z) dropped through Eden Editor, where, if some player leaves that area, that specific player is punished immediately and, if there is a vehicle with them, the vehicle must be destroyed too. Improvement desired: as the script is loaded by description.ext | cfgFunctions and the script checks all players alive (they are able to respawn) as long the match goes, the desire is to improve those lines, remembering my dedicated server runs, sometimes, til 30 players. Ps.: for now, the target is just human players, not considering AI units out there. Here we go: fn_PAC_init.sqf: if (!isServer) exitWith {}; private ["_playersAlive", "_isPlayableArea"]; [] spawn { while { true } do { _playersAlive = (allPlayers - (entities "HeadlessClient_F")) select {alive _x}; { // forEach _isPlayableArea = _x inArea PAC_playableAreaControl; // Eden trigger if !(_isPlayableArea) then { [_x, 1] call THY_PAC_fnc_setDamage; }; } forEach _playersAlive; sleep 5; }; }; fn_PAC_globalFunctions.sqf: THY_PAC_fnc_setDamage = { params ["_target", "_damage"]; ["You left the playable zone!"] remoteExec ["systemChat", _target]; sleep 0.1; if !(isNull objectParent _target) then // checking if the player is in vehicle { vehicle _target setDamage [_damage, false]; }; _target setDamage _damage; }; On Eden Editor: Dropped a trigger and name it as "PAC_playableAreaControl". Share your thoughts, it will be very much appreciated. thy- 3 replies
-
- playable area
- dedicated
-
(and 1 more)
Tagged with: