Skip to content

Console Debug Scripts

Alexis Haumaitre edited this page Jul 29, 2018 · 16 revisions

Add self to membersPool, assign as the commander (local)

miembros pushBackUnique (getPlayerUID player); publicVariable "miembros";
theBoss = player; publicVariable "theBoss";

Teleport player to the spectator camera position2D(local)

_coords = positionCameraToWorld [0,0,0];
_coords deleteAt 2;
player setpos _coords;

Delete vehicles, units in _radius of spectator camera(local)

[] spawn {
	_coords = positionCameraToWorld [0,0,0];
	_radius = 100;

	_list = _coords nearEntities [["AllVehicles"], _radius];
	{
		deleteVehicle _x;
	}forEach _list;

	sleep 1;
	_list = _coords nearEntities [["man"], _radius];
	{
	if!(_x in allPlayers)then{ deleteVehicle _x;};
	}forEach _list;
};

Enable UPSMON markers(server, HC)

UPSMON_Debug = 1;

Disable UPSMON markers and delete them from map (server, HC)

UPSMON_Debug = 0;
{
  private "_a";
  _a = toArray _x;
  _a resize 4;
  if (toString _a in ["mPos", "dest", "trk_"]) then {
    diag_log str _x;
	 deleteMarker _x;
  }
} forEach allMapMarkers;

ACE full heal self(local)

[player, player] call ace_medical_fnc_treatmentAdvanced_fullHeal;

Become commander

player setVariable ["elegible",true,true]; 
[player] call theBossInit;

Disable damage, disable agression(local)

player allowDamage false; player setCaptive true;

Gather performance info from server and all clients(excluding self) to RPT (local)

{
 private _str = format["clientOwner: %1, Server:%2, Dedicated:%3, interface:%4, player:%5, FPS:%6", clientOwner, isServer, isDedicated, hasInterface, name player, diag_fps];
 
 [
  [diag_activeScripts, diag_activeMissionFSMs, diag_activeSQFScripts, _str],
  {
   params["_scr","_fsms","_sqfs", "_str"];
   diag_log format["vvvvvvvvvv#     %1     #vvvvvvvvvv", _str];
   diag_log format["Scripts:%1", _scr];
   {diag_log format["FSM:%1", _x];}forEach _fsms;
   {diag_log format["SQF:%1", _x];}forEach _sqfs;
   }
 ]
 remoteExec ["call", remoteExecutedOwner];
}
remoteExec ["call", 0];

Monitor Headlessclient FPS and quantity of AI assigned (change the counter and the sleep to adapt to your need)

{     
 workerAnnounce =  [] spawn {  
  private _counter = 20; 
  while {_counter > 0} do {  
   { 
    [[remoteExecutedOwner, _counter],   
     {   
      [format["Worker:%1, FPS:%2, units:%3, counter:%4", clientOwner, diag_fps, {local _x}count allUnits, _this select 1]] remoteExec ["systemchat", 0];     
     }   
    ] remoteExec ["call", _x];     
   }forEach hcArray; 
   sleep 60; 
   _counter = _counter - 1; 
  };  
 } 
}     
remoteExec ["call", 2];

Teleport ammobox and other hq assets to you

petros (Petros), caja (ammobox), bandera (flag), cajaveh (vehicle ammobox), fuego (campfire/lamp) and mapa (the map)

caja setPos (getPos player);
Clone this wiki locally