I'm a complete noob at scripting, I have the script and the bikey, I just need to know where to put it, I put the bikey in the init.sqf and made a sqf for the script but I honestly have no fucking clue how to get it to work on any level, could someone help?
Script;
//////////////////////////////////////////
//
// Global Mobilization Force Recon
//
// Copyright: Mondkalb, 2023
//////////////////////////////////////////
params ["_currentLocation"];
if isServer then
{
\_tower = nearestObject \[getPosATL \_currentLocation, "land\_gm\_tower\_bt\_11\_60"\];
\_SLOffset = \[0,0.0,6.7\];
if isNull \_tower then
{
\\\_tower = nearestObject \\\[getPosATL \\\_currentLocation, "land\\\_gm\\\_tower\\\_bt\\\_6\\\_fuest\\\_80"\\\];
\\\_SLOffset = \\\[0,0.0,8.45\\\];
};
if !(isNull \_tower) then
{
\\\[\\\_tower,\\\["searchlight\\\_source", 1, true\\\]\\\] remoteExec \\\["animateSource", 0, true\\\]; // hide it for all people, also jippees
\\\_tpos = getPosATL \\\_tower;
\\\_sl = "gm\\\_gc\\\_bgs\\\_searchlight\\\_01\\\_slow" createVehicle \\\[10,10,10\\\];
\\\_sl setPos (\\\_tower modelToWorld \\\_SLOffset);
\\\_tower setVariable \\\["gm\\\_fr\\\_towerSL", \\\_sl\\\];
\\\_newGroup = createGroup \\\[gm\\\_fr\\\_side\\\_enemy, true\\\];
\\\_newGroup setVariable \\\["gm\\\_fr\\\_dbg\\\_grpType", "t", (gm\\\_fr\\\_extendedDebugMode==1)\\\];
\\\_newGroup enableDynamicSimulation true;
\\\_dude = \\\_newGroup createUnit \\\[selectRandom gm\\\_fr\\\_guardTowerCrew, \\\_tpos, \\\[\\\], 0, "NONE"\\\];
\\\[\\\_dude\\\] joinSilent \\\_newGroup;
\\\_dude triggerDynamicSimulation false;
\\\_dude enableDynamicSimulation true;
\\\_dude moveInTurret \\\[\\\_sl, \\\[0\\\]\\\];
\\\_dude action \\\["searchlighton", \\\_sl\\\];
\\\_dude = \\\_newGroup createUnit \\\[selectRandom gm\\\_fr\\\_guardTowerCrew, \\\_tpos, \\\[\\\], 0, "NONE"\\\];
\\\[\\\_dude\\\] joinSilent \\\_newGroup;
\\\_dude triggerDynamicSimulation false;
\\\_dude enableDynamicSimulation true;
\\\_gpos = \\\_tower selectionPosition \\\["guard\\\_pos", "Memory", "FirstPoint"\\\];
\\\_topTowerPos = (\\\_tower modelToWorld \\\_gpos);
\\\_dude setPosATL \\\_topTowerPos;
\\\_currentLocation setPosATL \\\_topTowerPos;
// \\\_dude disableAI "move";
doStop \\\_dude;
\\\_tower addEventhandler
\\\[
"Killed",
{
params ["_tower"];
(_tower getVariable ["gm_fr_towerSL", objNull]) setDamage 1;
deleteVehicle (_tower getVariable ["gm_fr_towerSL", objNull]);
}
\\\];
\\\_newGroup addEventHandler \\\["KnowsAboutChanged", {\\\_this call (gm\\\_alias\\\_fr\\\_fnc\\\_raiseAlarm#0)}\\\];
if !isMultiplayer then
{
\\\_debugMarker = \\\[getPosATL \\\_tower, "mil\\\_box", "colorOPFOR"\\\] call (gm\\\_alias\\\_fr\\\_fnc\\\_debugMarker#0);
\\\_currentLocation setVariable \\\["gm\\\_fr\\\_dbgmrk", \\\_debugMarker\\\];
};
\\\_currentLocation setVariable \\\["gm\\\_fr\\\_spawnorigin", \\\_tpos\\\];
\\\_sl spawn
{
while {(alive gunner \\\_this) and !(group \\\_this getVariable \\\["gm\\\_fr\\\_alerted", false\\\])} do
{
(gunner _this) doWatch (_this getPos [30 + random 150, random 360]);
sleep (5+random 20);
{
_tgt = _x;
if ((gunner _this knowsAbout _tgt) > 1.5) then
{
(group _this setVariable ["gm_fr_alerted", true]); // exit loop with the known target
{_x doTarget _tgt;_x doWatch _tgt; _x doFire _tgt} forEach units group _this;
};
} forEach call BIS_fnc_listPlayers;
};
};
};
};