So I got the "addAction.sqf" to work. It calls a function that is supposed to create a marker, "fob", and allow for a "onSingleMapClick" that will setPos the marker and create a vehicle. The marker gets created, but the reposition and vehicle creation don't happen.
init.sqf(test for setFOB.sqf):
#include "functions\setFOB.sqf"
addAction.sqf
if (!isServer) exitWith {};
waituntil {!isnil "bis_fnc_init"};
if (!isnil "s1") then {
if (player == s1) then {
//if ("fnc_CWO_setFOB")
//player is s1, do whatever
//mf = player addaction ["Set FOB Location","action.sqf",{call fnc_CWO_FOB}];
mf = player addaction [("<t color=""#ffffff"">" + ("Set FOB Location") + "</t>"),"action.sqf",{call fnc_CWO_FOB}];
hint "go";
};
};
setFOB.sqf:
/*****************************************************************
This Script facilitates the setting and removal of the Company Forward Operating Base (FOB).
The Company Commander will have the ability to set the location of the Company FOB from any location on the map. Once placed the addAction will be removed until he tours the battle field (enters a trigger that that makes a publicvarable true enabling a trigger, at Base, to add the action to back to the Commander).
*/
publicVariable "fnc_CWO_FOB";
fnc_CWO_FOB = {
private ["FOB"];
if (!isServer) exitWith {};
waituntil {!isnil "bis_fnc_init"};
hint "Commander you may select the position to construct a Forward Operating Base";
FOB = createMarker['fob',[10,10,10]];
FOB setMarkerShape "ICON";
"fob" setMarkerType "FOB";
"fob" setMarkerColor "ColorBlue";
"fob" setMarkerText "F.O.B.";
GetClick = true;
onMapSingleClick
{
'fob' setMarkerPos _pos;
"ACE_BCS_HMMV" createVehicle _pos;
GetClick = false;
};
waitUntil{!GetClick};
onMapSingleClick "";
};