├── .gitignore ├── loadLogo.jpg ├── overviewLogo.jpg ├── ws_fnc ├── description.ext ├── Dbg │ ├── fn_copypos.sqf │ ├── fn_debugText.sqf │ ├── fn_clipboardcode.sqf │ ├── fn_countUnits.sqf │ ├── fn_typecheck.sqf │ └── fn_debugTriggers.sqf ├── Tools │ ├── fn_listPlayers.sqf │ ├── fn_getObjectClasses.sqf │ ├── fn_showFPS.sqf │ ├── fn_checkHC.sqf │ ├── fn_nearPlayer.sqf │ ├── fn_gamecheck.sqf │ ├── fn_collectMarkers.sqf │ ├── fn_collectObjects.sqf │ ├── fn_setGVar.sqf │ ├── fn_collectObjectsNum.sqf │ ├── fn_isWallInDir.sqf │ └── fn_collectBuildings.sqf ├── effects │ ├── fn_createLightning.sqf │ ├── fn_createOrdnance.sqf │ ├── fn_createCAS.sqf │ └── fn_createTripflare.sqf ├── getPos │ ├── fn_getEPos.sqf │ ├── fn_getBpos.sqf │ ├── fn_NearestLandPos.sqf │ ├── fn_NearestRoadPos.sqf │ └── fn_getPosInArea.sqf ├── README.md ├── misc │ ├── fn_showIntro.sqf │ ├── fn_broadcast.sqf │ ├── fn_attachIR.sqf │ ├── fn_attachLight.sqf │ ├── fn_attachChem.sqf │ └── fn_switchLights.sqf ├── AI │ ├── fn_setInsidePos.sqf │ ├── fn_taskCrew.sqf │ ├── fn_setAIMode.sqf │ └── fn_bettervehicle.sqf └── config.hpp ├── f ├── assignGear │ ├── insignia │ │ ├── AAF_A1.paa │ │ ├── AAF_A2.paa │ │ ├── AAF_A3.paa │ │ ├── AAF_ASL.paa │ │ ├── AAF_B1.paa │ │ ├── AAF_B2.paa │ │ ├── AAF_B3.paa │ │ ├── AAF_BSL.paa │ │ ├── AAF_C1.paa │ │ ├── AAF_C2.paa │ │ ├── AAF_C3.paa │ │ ├── AAF_CO.paa │ │ ├── AAF_CSL.paa │ │ ├── AAF_DC.paa │ │ ├── AAF_J1.paa │ │ ├── AAF_J2.paa │ │ ├── AAF_J3.paa │ │ ├── AAF_JSL.paa │ │ ├── CSAT_A1.paa │ │ ├── CSAT_A2.paa │ │ ├── CSAT_A3.paa │ │ ├── CSAT_B1.paa │ │ ├── CSAT_B2.paa │ │ ├── CSAT_B3.paa │ │ ├── CSAT_C1.paa │ │ ├── CSAT_C2.paa │ │ ├── CSAT_C3.paa │ │ ├── CSAT_CO.paa │ │ ├── CSAT_DC.paa │ │ ├── CSAT_J1.paa │ │ ├── CSAT_J2.paa │ │ ├── CSAT_J3.paa │ │ ├── NATO_A1.paa │ │ ├── NATO_A2.paa │ │ ├── NATO_A3.paa │ │ ├── NATO_B1.paa │ │ ├── NATO_B2.paa │ │ ├── NATO_B3.paa │ │ ├── NATO_C1.paa │ │ ├── NATO_C2.paa │ │ ├── NATO_C3.paa │ │ ├── NATO_CO.paa │ │ ├── NATO_DC.paa │ │ ├── NATO_J1.paa │ │ ├── NATO_J2.paa │ │ ├── NATO_J3.paa │ │ ├── AAF_Medic.paa │ │ ├── CSAT_ASL.paa │ │ ├── CSAT_BSL.paa │ │ ├── CSAT_CSL.paa │ │ ├── CSAT_JSL.paa │ │ ├── NATO_ASL.paa │ │ ├── NATO_BSL.paa │ │ ├── NATO_CSL.paa │ │ ├── NATO_JSL.paa │ │ ├── CSAT_Medic.paa │ │ ├── NATO_Medic.paa │ │ ├── CSAT_Urban_A1.paa │ │ ├── CSAT_Urban_A2.paa │ │ ├── CSAT_Urban_A3.paa │ │ ├── CSAT_Urban_ASL.paa │ │ ├── CSAT_Urban_B1.paa │ │ ├── CSAT_Urban_B2.paa │ │ ├── CSAT_Urban_B3.paa │ │ ├── CSAT_Urban_BSL.paa │ │ ├── CSAT_Urban_C1.paa │ │ ├── CSAT_Urban_C2.paa │ │ ├── CSAT_Urban_C3.paa │ │ ├── CSAT_Urban_CO.paa │ │ ├── CSAT_Urban_CSL.paa │ │ ├── CSAT_Urban_DC.paa │ │ ├── CSAT_Urban_J1.paa │ │ ├── CSAT_Urban_J2.paa │ │ ├── CSAT_Urban_J3.paa │ │ ├── CSAT_Urban_JSL.paa │ │ ├── CSAT_Pacific_A1.paa │ │ ├── CSAT_Pacific_A2.paa │ │ ├── CSAT_Pacific_A3.paa │ │ ├── CSAT_Pacific_ASL.paa │ │ ├── CSAT_Pacific_B1.paa │ │ ├── CSAT_Pacific_B2.paa │ │ ├── CSAT_Pacific_B3.paa │ │ ├── CSAT_Pacific_BSL.paa │ │ ├── CSAT_Pacific_C1.paa │ │ ├── CSAT_Pacific_C2.paa │ │ ├── CSAT_Pacific_C3.paa │ │ ├── CSAT_Pacific_CO.paa │ │ ├── CSAT_Pacific_CSL.paa │ │ ├── CSAT_Pacific_DC.paa │ │ ├── CSAT_Pacific_J1.paa │ │ ├── CSAT_Pacific_J2.paa │ │ ├── CSAT_Pacific_J3.paa │ │ ├── CSAT_Pacific_JSL.paa │ │ ├── CSAT_Urban_Medic.paa │ │ ├── NATO_Pacific_A1.paa │ │ ├── NATO_Pacific_A2.paa │ │ ├── NATO_Pacific_A3.paa │ │ ├── NATO_Pacific_ASL.paa │ │ ├── NATO_Pacific_B1.paa │ │ ├── NATO_Pacific_B2.paa │ │ ├── NATO_Pacific_B3.paa │ │ ├── NATO_Pacific_BSL.paa │ │ ├── NATO_Pacific_C1.paa │ │ ├── NATO_Pacific_C2.paa │ │ ├── NATO_Pacific_C3.paa │ │ ├── NATO_Pacific_CO.paa │ │ ├── NATO_Pacific_CSL.paa │ │ ├── NATO_Pacific_DC.paa │ │ ├── NATO_Pacific_J1.paa │ │ ├── NATO_Pacific_J2.paa │ │ ├── NATO_Pacific_J3.paa │ │ ├── NATO_Pacific_JSL.paa │ │ ├── CSAT_Pacific_Medic.paa │ │ └── NATO_Pacific_Medic.paa │ ├── f_assignGear_default.sqf │ ├── f_assignGear_attachments.sqf │ └── f_assignGear_clothes.sqf ├── skulls │ ├── gruntBirthdayParty.ogg │ ├── f_skullsSounds.hpp │ ├── fn_skullsInit.sqf │ └── fn_gruntBirthdayParty.sqf ├── spect │ ├── fn_terminateSpectator.sqf │ └── fn_activateSpectator.sqf ├── setGroupID │ ├── fn_setGroupID.sqf │ └── f_setGroupIDs.sqf ├── mapClickTeleport │ ├── fn_mapClickTeleportRemoveAction.sqf │ ├── fn_mapClickTeleportBriefing.sqf │ ├── fn_mapClickTeleportParachute.sqf │ └── fn_mapClickTeleportSetPos.sqf ├── nametag │ ├── include │ │ ├── f_nametagCheckMods.sqf │ │ ├── f_nametagCacheLoop.sqf │ │ ├── f_nametagDisableKey.sqf │ │ ├── f_nametagInitTalking.sqf │ │ └── f_nametagBrief.sqf │ └── functions │ │ ├── fn_getZoom.sqf │ │ └── fn_nametagCache.sqf ├── cache │ ├── fn_gUncache.sqf │ ├── fn_gCache.sqf │ ├── fn_cTracker.sqf │ └── fn_cInit.sqf ├── common │ ├── fn_virtualFaction.sqf │ ├── fn_nearPlayer.sqf │ ├── fn_setVirtualFaction.sqf │ └── fn_processParamsArray.sqf ├── FTMemberMarkers │ ├── fn_GetMarkerColor.sqf │ ├── fn_SetLocalFTMemberMarkers.sqf │ └── f_localFTMemberMarker.sqf ├── briefing │ ├── f_briefing_credits.sqf │ ├── f_briefing_aaf.sqf │ ├── f_briefing_fia.sqf │ ├── f_briefing_ldf.sqf │ ├── f_briefing_npr.sqf │ ├── f_briefing_csat.sqf │ ├── f_briefing_ctrg.sqf │ ├── f_briefing_nato.sqf │ ├── f_briefing_zeus.sqf │ ├── f_briefing_3ifb.sqf │ ├── f_briefing_spetsnaz.sqf │ ├── f_briefing_syndikat.sqf │ ├── f_briefing_civ.sqf │ └── f_briefing_gendarmerie.sqf ├── zeus │ ├── fn_zeusInitLocal.sqf │ ├── fn_zeusAddAddons.sqf │ └── fn_zeusAddObjects.sqf ├── mpEnd │ └── fn_mpEnd.sqf ├── safeStart │ ├── f_safeStart.sqf │ ├── fn_safety.sqf │ └── f_safeStartLoop.sqf ├── fcs │ ├── fn_fcsLocalWarning.sqf │ ├── fn_fcsCommanderOverride.sqf │ ├── fn_fcsPersistentEffects.sqf │ ├── fn_fcsBriefing.sqf │ └── fn_fcsFailure.sqf ├── missionConditions │ ├── fn_ColdBreath.sqf │ ├── fn_SetWind.sqf │ ├── fn_SetFog.sqf │ └── f_setMissionConditions.sqf ├── medical │ ├── fn_addDragAction.sqf │ ├── f_clsEH.sqf │ ├── init.sqf │ └── fn_onDrag.sqf ├── brakeOverride │ └── fn_brakeOverride.sqf ├── dynamicViewDistance │ ├── f_setViewDistanceInit.sqf │ └── fn_ehSetViewDistance.sqf ├── setTeamColours │ └── f_setTeamColours.sqf ├── disableThermals │ └── fn_disableThermals.sqf ├── groupMarkers │ ├── fn_localGroupMarker.sqf │ └── fn_localSpecialistMarker.sqf ├── setAISkill │ └── fn_setAISkill.sqf └── authorisedCrew │ └── fn_authorisedCrewCheck.sqf ├── README.md └── readme.txt /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /loadLogo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/loadLogo.jpg -------------------------------------------------------------------------------- /overviewLogo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/overviewLogo.jpg -------------------------------------------------------------------------------- /ws_fnc/description.ext: -------------------------------------------------------------------------------- 1 | class CfgFunctions 2 | { 3 | #include "ws_fnc\config.hpp" 4 | }; -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_A1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_A1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_A2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_A2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_A3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_A3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_ASL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_ASL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_B1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_B1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_B2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_B2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_B3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_B3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_BSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_BSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_C1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_C1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_C2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_C2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_C3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_C3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_CO.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_CO.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_CSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_CSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_DC.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_DC.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_J1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_J1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_J2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_J2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_J3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_J3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_JSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_JSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_A1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_A1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_A2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_A2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_A3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_A3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_B1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_B1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_B2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_B2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_B3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_B3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_C1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_C1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_C2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_C2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_C3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_C3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_CO.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_CO.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_DC.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_DC.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_J1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_J1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_J2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_J2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_J3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_J3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_A1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_A1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_A2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_A2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_A3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_A3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_B1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_B1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_B2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_B2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_B3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_B3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_C1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_C1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_C2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_C2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_C3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_C3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_CO.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_CO.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_DC.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_DC.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_J1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_J1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_J2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_J2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_J3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_J3.paa -------------------------------------------------------------------------------- /f/skulls/gruntBirthdayParty.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/skulls/gruntBirthdayParty.ogg -------------------------------------------------------------------------------- /f/assignGear/insignia/AAF_Medic.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/AAF_Medic.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_ASL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_ASL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_BSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_BSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_CSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_CSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_JSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_JSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_ASL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_ASL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_BSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_BSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_CSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_CSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_JSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_JSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Medic.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Medic.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Medic.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Medic.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_A1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_A1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_A2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_A2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_A3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_A3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_ASL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_ASL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_B1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_B1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_B2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_B2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_B3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_B3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_BSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_BSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_C1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_C1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_C2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_C2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_C3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_C3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_CO.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_CO.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_CSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_CSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_DC.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_DC.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_J1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_J1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_J2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_J2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_J3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_J3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_JSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_JSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_A1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_A1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_A2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_A2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_A3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_A3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_ASL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_ASL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_B1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_B1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_B2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_B2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_B3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_B3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_BSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_BSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_C1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_C1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_C2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_C2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_C3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_C3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_CO.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_CO.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_CSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_CSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_DC.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_DC.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_J1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_J1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_J2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_J2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_J3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_J3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_JSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_JSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Urban_Medic.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Urban_Medic.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_A1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_A1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_A2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_A2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_A3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_A3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_ASL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_ASL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_B1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_B1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_B2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_B2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_B3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_B3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_BSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_BSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_C1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_C1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_C2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_C2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_C3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_C3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_CO.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_CO.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_CSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_CSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_DC.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_DC.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_J1.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_J1.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_J2.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_J2.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_J3.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_J3.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_JSL.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_JSL.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/CSAT_Pacific_Medic.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/CSAT_Pacific_Medic.paa -------------------------------------------------------------------------------- /f/assignGear/insignia/NATO_Pacific_Medic.paa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/folkarps/F3/HEAD/f/assignGear/insignia/NATO_Pacific_Medic.paa -------------------------------------------------------------------------------- /f/spect/fn_terminateSpectator.sqf: -------------------------------------------------------------------------------- 1 | 2 | ["Terminate"] call BIS_fnc_EGSpectator; 3 | 4 | // Enable direct chat since it's been disabled in activateSpectator 5 | 5 enableChannel true; 6 | -------------------------------------------------------------------------------- /ws_fnc/Dbg/fn_copypos.sqf: -------------------------------------------------------------------------------- 1 | private _pos = [(getposASL player) select 0,(getposASL player) select 1,(getposATL player) select 2]; 2 | copyToClipboard format ["%1",_pos]; 3 | ["ws_fnc_copyPos: ",_pos," copied!"] call ws_fnc_debugtext; 4 | -------------------------------------------------------------------------------- /ws_fnc/Tools/fn_listPlayers.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | ws_fnc_listPlayers 3 | 4 | FEATURE 5 | Lists all players 6 | 7 | USAGE 8 | [] call ws_fnc_listPlayers 9 | 10 | RETURNS 11 | array containing all players 12 | */ 13 | 14 | playableUnits select {isPlayer _x} 15 | -------------------------------------------------------------------------------- /f/assignGear/f_assignGear_default.sqf: -------------------------------------------------------------------------------- 1 | 2 | // Default case for the _typeofUnit switch-case. 3 | 4 | default { 5 | private _msg = format ["DEBUG (assignGear.sqf): Error: Unknown type %1 in faction %2 for unit %3.", _typeofUnit, _faction, _unit]; 6 | systemChat _msg; 7 | diag_log _msg; 8 | }; 9 | -------------------------------------------------------------------------------- /ws_fnc/Tools/fn_getObjectClasses.sqf: -------------------------------------------------------------------------------- 1 | /* ws_fnc_getObjectClasses 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | 4 | FEATURE 5 | Returns array of object classes 6 | 7 | USAGE 8 | [objects] call ws_fnc_getObjectClasses 9 | 10 | */ 11 | 12 | params[ 13 | ["_objects", [], [[]]] 14 | ]; 15 | 16 | _objects apply {typeOf _x} 17 | -------------------------------------------------------------------------------- /f/skulls/f_skullsSounds.hpp: -------------------------------------------------------------------------------- 1 | // FA3 - Skulls module - sounds config included in description.ext 2 | class f_gruntBirthdayParty 3 | { 4 | // how the sound is referred to in the editor (e.g. trigger effects) 5 | name = "Grunt Birthday Party"; 6 | // filename, volume, pitch, distance (optional) 7 | sound[] = { "f\skulls\gruntBirthdayParty.ogg", 1, 1, 100 }; 8 | titles[] = {}; 9 | }; -------------------------------------------------------------------------------- /ws_fnc/Dbg/fn_debugText.sqf: -------------------------------------------------------------------------------- 1 | //ws_fnc_debugtext 2 | //dump variables into sidechat and rpt 3 | //["String",[array of variables],"String"] call ws_fnc_debugtext 4 | 5 | params [ 6 | ["_string1", ""], 7 | ["_variables", ""], 8 | ["_string2", ""] 9 | ]; 10 | 11 | private _text = _string1 + format [" %1 ",_variables] + _string2 + format [" - Time: %1 ms",diag_tickTime]; 12 | 13 | systemchat _text; 14 | diag_log _text; 15 | -------------------------------------------------------------------------------- /ws_fnc/Dbg/fn_clipboardcode.sqf: -------------------------------------------------------------------------------- 1 | //ws_fnc_clipboardcode 2 | //run code from clipboard 3 | //call ws_fnc_clipboardcode 4 | 5 | private ["_code","_error"]; 6 | 7 | _code = copyFromClipboard; 8 | _error = [_code,["STRING","CODE"],"ws_fnc_clipboardcode"] call ws_fnc_typecheck; 9 | if (_error) exitWith {["ws_fnc_clipboardcode DBG: ",_code," invalid. exiting."] call ws_fnc_debugtext}; 10 | ["ws_fnc_clipboardcode DBG: ",_code," executing."] call ws_fnc_debugtext; 11 | [] spawn (compile _code); 12 | -------------------------------------------------------------------------------- /ws_fnc/Tools/fn_showFPS.sqf: -------------------------------------------------------------------------------- 1 | // ws_fnc_showFPS 2 | // By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | /* 4 | FEATURE 5 | Display FPS in hint window 6 | 7 | USAGE 8 | [] call ws_fnc_showFPS 9 | [time in seconds] call ws_fnc_showFPS 10 | 11 | PARAMETERS 12 | 1. Time for the FPS to be measured | OPTIONAL - default is 60 seconds 13 | 14 | NOTE 15 | ARMA 3 only 16 | */ 17 | 18 | params [ 19 | ["_time", 60, [0]] 20 | ]; 21 | 22 | [_time,[format ["%1",name player]]] call BIS_fnc_FPS; 23 | -------------------------------------------------------------------------------- /f/setGroupID/fn_setGroupID.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Set Group ID Function 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // DECLARE VARIABLES 6 | private ["_grp"]; 7 | 8 | params [ 9 | ["_grp_var", "", [""]], 10 | ["_grp_id", "", [""]] 11 | ]; 12 | 13 | // Check first if the group exists 14 | 15 | _grp = missionNamespace getVariable[_grp_var,grpNull]; 16 | if(!isNull _grp && _grp isEqualType grpNull) then { 17 | _grp setGroupId [_grp_id,"GroupColor0"]; 18 | }; 19 | -------------------------------------------------------------------------------- /ws_fnc/Dbg/fn_countUnits.sqf: -------------------------------------------------------------------------------- 1 | private ["_uw","_ue","_ur","_up"]; 2 | 3 | _uw = {side _x == west && alive _x && !isPlayer _x} count allUnits; 4 | _ue = {side _x == east && alive _x && !isPlayer _x} count allUnits; 5 | _ur = {side _x == resistance && alive _x && !isPlayer _x} count allUnits; 6 | _up = {isPlayer _x} count allUnits; 7 | 8 | player globalchat format ["Players: %1, Playable Units: %2, AI: BLU/%3, OPF/%4, RES/%5",_up,count playableUnits,_uw,_ue,_ur]; 9 | diag_log format ["Players: %1, Playable Units: %2, AI: BLU/%3, OPF/%4, RES/%5",_up,count playableUnits,_uw,_ue,_ur]; 10 | -------------------------------------------------------------------------------- /ws_fnc/Tools/fn_checkHC.sqf: -------------------------------------------------------------------------------- 1 | /* ws_fnc_checkHC 2 | Checks whether client is headless client or not 3 | 4 | SETS 5 | - ws_var_isHC (bool) to true where client is HC 6 | - ws_var_HCs (array) contains all present HCs 7 | 8 | RETURNS 9 | true/false for HC/not-HC 10 | */ 11 | 12 | private _hc = false; 13 | ws_var_isHC = false; 14 | ["ws_var_HCs",[],true] call ws_fnc_setGVar; 15 | 16 | if (!hasInterface && !isServer) then { 17 | _hc = true; 18 | ws_var_isHC=true; 19 | 20 | if !(player in ws_var_HCs) then { 21 | ws_var_HCs pushback (player); publicVariable "ws_var_HCs"; 22 | }; 23 | }; 24 | 25 | _hc 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # F3-Folk ARPS Mission-making Template # 2 | 3 | ## Changes from default F3 ## 4 | 5 | * Wolfenswan's function library (ws_fnc) integrated 6 | * Folk ARPS logo.jpg file included 7 | * F3 features pre-enabled: 8 | * Name Tags 9 | * Automatic Body Removal 10 | * Safe Start default set to 1 minute 11 | * Set AI Skill for all factions - Missionmakers can remove the cases they do not need 12 | * Numerous feature updates and improvements. See https://github.com/folkarps/F3 for update history. 13 | 14 | ## Versions ## 15 | * F3 3-5-7 16 | * ws_fnc 05/07/2015 (with FA improvements) 17 | -------------------------------------------------------------------------------- /f/mapClickTeleport/fn_mapClickTeleportRemoveAction.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Mission Maker Teleport 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // REMOVE ACTION 6 | // Remove the action if we don't have any uses left 7 | 8 | if (isNil "f_mapClickTeleportAction") exitWith {}; 9 | 10 | f_var_mapClickTeleport_Used = f_var_mapClickTeleport_Used + 1; 11 | 12 | if (f_var_mapClickTeleport_Uses != 0 && f_var_mapClickTeleport_Used >= f_var_mapClickTeleport_Uses) then { 13 | player removeAction f_mapClickTeleportAction; 14 | }; 15 | -------------------------------------------------------------------------------- /f/nametag/include/f_nametagCheckMods.sqf: -------------------------------------------------------------------------------- 1 | //==================================================================================== 2 | // 3 | // f_nametagInitMods.sqf - Checks for ACE, ACRE, and/or TFAR presence. 4 | // @ /u/Whalen207 | Whale #5963 5 | // 6 | //==================================================================================== 7 | 8 | //------------------------------------------------------------------------------------ 9 | // Checking for mods. 10 | //------------------------------------------------------------------------------------ 11 | 12 | // CBA 13 | F_NT_MOD_CBA = isClass(configFile >> "CfgPatches" >> "cba_settings"); 14 | -------------------------------------------------------------------------------- /f/cache/fn_gUncache.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Caching Script Group Uncacher 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | { 6 | _x enableSimulationGlobal true; 7 | _x hideObjectGlobal false; 8 | 9 | // If the group leader is moving, set his group back next to him 10 | if (speed leader _this > 0 && vehicle _x == _x) then { 11 | _x setPosATL [(formationPosition _x) select 0, (formationPosition _x) select 1, 0]; 12 | }; 13 | 14 | if (vehicle _x != _x) then {(vehicle _x) hideObjectGlobal false}; 15 | 16 | sleep 0.1; 17 | } forEach units _this; 18 | 19 | true 20 | -------------------------------------------------------------------------------- /f/nametag/functions/fn_getZoom.sqf: -------------------------------------------------------------------------------- 1 | //==================================================================================== 2 | // 3 | // fn_getZoom.sqf - Gets player zoom, where default is 1.0 4 | // > _zoom = call f_fnc_getZoom; < 5 | // 6 | // Adapted from code by Killzone Kid. 7 | // http://killzonekid.com/arma-scripting-tutorials-get-zoom/ 8 | // 9 | // @ /u/Whalen207 | Whale #5963 10 | // 11 | //==================================================================================== 12 | 13 | ( 14 | ( 15 | [0.5,0.5] 16 | distance2D 17 | worldToScreen 18 | positionCameraToWorld 19 | [0,3,4] 20 | ) * ( 21 | getResolution 22 | select 5 23 | ) / 2 24 | ) + 0.66666 25 | -------------------------------------------------------------------------------- /ws_fnc/effects/fn_createLightning.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_createLightning 2 | 3 | FEATURE 4 | Creates a ZEUS lighting at the given location 5 | 6 | USAGE 7 | position call ws_fnc_createLightning 8 | 9 | PARAMETERS 10 | 1. Center of Lightning strike (can be unit, marker or position) | MANDATORY 11 | 12 | RETURNS 13 | true 14 | */ 15 | 16 | private ["_pos","_dummy"]; 17 | 18 | _pos = _this call ws_fnc_getEPos; 19 | 20 | _dummy = "LaserTargetCBase" createVehicle _pos; 21 | _dummy enableSimulationGlobal false; _dummy hideObjectGlobal true; 22 | 23 | [_dummy,nil,true] call BIS_fnc_moduleLightning; 24 | 25 | [_dummy] spawn { 26 | params [["_object", objNull, [objNull]]]; 27 | sleep 10; 28 | deleteVehicle _object; 29 | }; 30 | 31 | true 32 | -------------------------------------------------------------------------------- /f/common/fn_virtualFaction.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Determine Virtual Faction Function 2 | // Scope: Argument Global, Effect Local 3 | // Credits: Please see the FA3 online manual (https://github.com/folkarps/F3/wiki) 4 | // ==================================================================================== 5 | 6 | // DECLARE VARIABLES AND FUNCTIONS 7 | 8 | private ["_obj"]; 9 | 10 | // SET KEY VARIABLES 11 | // Using the arguments passed to the script, we first define some local variables. 12 | 13 | params [["_obj", objNull, [objNull]]]; 14 | 15 | // DETERMINE VIRTUAL FACTION 16 | // Get the virtual faction name variable of the object. If it is unset, return the output of `faction` instead 17 | _obj getVariable ["f_var_internal_virtualFactionName", faction _obj]; 18 | -------------------------------------------------------------------------------- /ws_fnc/Tools/fn_nearPlayer.sqf: -------------------------------------------------------------------------------- 1 | /* 2 | ws_fnc_nearPlayer 3 | Latest: 15.01.2014 4 | 5 | Based on CBA_fnc_listPlayer 6 | 7 | FEATURE 8 | Checks if player is within distance of unit 9 | 10 | USAGE 11 | [unit,distance] call ws_fnc_nearPlayer 12 | 13 | PARAMETERS 14 | 1. Entitiy to be checked from | MANDATORY 15 | 2. Distance to unit to be checked for player | MANDATORY 16 | 17 | RETURNS 18 | true or false 19 | */ 20 | 21 | params [ 22 | ["_ent", objNull, ["", objNull, grpNull, locationNull, []]], 23 | ["_distance", 0, [0]] 24 | ]; 25 | 26 | private ["_pos","_players"]; 27 | 28 | _pos = _ent call ws_fnc_getEPos; 29 | _players = [] call ws_fnc_listPlayers; 30 | 31 | { 32 | if (_pos distance _x < _distance) exitWith {true}; 33 | false 34 | } forEach _players; 35 | -------------------------------------------------------------------------------- /ws_fnc/getPos/fn_getEPos.sqf: -------------------------------------------------------------------------------- 1 | /* ws_getEPos 2 | Returns the position of an entitiy 3 | 4 | USAGE 5 | entity call ws_fnc_getEPos; 6 | 7 | PARAMETERS 8 | 1. Can be string (markername), object, groupname or location 9 | 10 | RETURNS 11 | positional array (ATL) 12 | */ 13 | 14 | private ["_e","_pos"]; 15 | 16 | _e = _this; 17 | _pos = []; 18 | 19 | //Getting a good position from the parsed values 20 | switch (typename _e) do { 21 | case "STRING": {_pos = getMarkerPos _e}; 22 | case "OBJECT": {_pos = getPosATL _e}; 23 | case "GROUP": {_pos = getPosATL (leader _e)}; 24 | case "LOCATION": {_pos = position _e}; 25 | case "ARRAY": {_pos = _e;}; 26 | default {[_e,["ARRAY","OBJECT","STRING","GROUP","LOCATION"],"ws_fnc_getEPos"] call ws_fnc_typecheck;}; 27 | }; 28 | 29 | _pos 30 | -------------------------------------------------------------------------------- /ws_fnc/Tools/fn_gamecheck.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_gameCheck 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | 4 | FEATURE 5 | Checks whether A2:CO or A3 is running 6 | 7 | USAGE 8 | [] call ws_fnc_gameCheck 9 | 10 | RETURNS 11 | "a2" for ARMA2 (all versions) 12 | "a3" for ARMA3 13 | */ 14 | 15 | private _game = productVersion; //if productversion doesn't work we're on a A2 version <1.62 16 | if (isNil "_game") then { 17 | _game = "a2"; 18 | } else { 19 | if (_game select 1 != "ARMA3") then { 20 | _game = "a2"; 21 | } else { 22 | _game = "a3"; 23 | }; 24 | }; 25 | 26 | if (isNil "ws_game_a3") then { 27 | switch (_game) do { 28 | case "a2": {ws_game_a3 = false;}; 29 | case "a3": {ws_game_a3 = true;}; 30 | }; 31 | publicVariable "ws_game_a3"; 32 | }; 33 | 34 | _game 35 | -------------------------------------------------------------------------------- /f/assignGear/f_assignGear_attachments.sqf: -------------------------------------------------------------------------------- 1 | if (_attachments isEqualType []) then { 2 | removeAllPrimaryWeaponItems _unit; 3 | { 4 | // loop through the attachments and add them to the weapon 5 | _unit addPrimaryWeaponItem _x; 6 | } foreach _attachments; 7 | }; 8 | 9 | // Handle handgun attachments 10 | if (_hg_attachments isEqualType []) then { 11 | removeAllHandgunItems _unit; 12 | { 13 | // loop through the attachments and add them to the weapon 14 | _unit addHandgunItem _x; 15 | } foreach _hg_attachments; 16 | }; 17 | 18 | // Handle launcher attachments 19 | if (_lau_attachments isEqualType []) then { 20 | removeAllSecondaryWeaponItems _unit; 21 | { 22 | // loop through the attachments and add them to the weapon 23 | _unit addSecondaryWeaponItem _x; 24 | } foreach _lau_attachments; 25 | }; 26 | -------------------------------------------------------------------------------- /f/skulls/fn_skullsInit.sqf: -------------------------------------------------------------------------------- 1 | // FA3 - Skulls module 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // This component initialises various special effects if they're turned on by a mission parameter. 4 | // ==================================================================================== 5 | 6 | // Grunt Birthday Party - yaaaayyyy! 7 | if (f_param_gruntBirthdayParty > 0) then { 8 | f_var_gruntBirthdayPartyEH = addMissionEventHandler ["EntityKilled",{ 9 | params ["_unit", "_killer", "_instigator", "_useEffects"]; 10 | if (_unit isKindOf "CAManBase") then { 11 | // If running in Players Only mode and this isn't a player, do nothing. 12 | if (!(isPlayer [_unit]) && (f_param_gruntBirthdayParty == 1)) exitWith {}; 13 | [_unit] spawn f_fnc_gruntBirthdayParty; 14 | }; 15 | }]; 16 | }; 17 | -------------------------------------------------------------------------------- /f/common/fn_nearPlayer.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Near Player Function 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // DECLARE VARIABLES AND FUNCTIONS 6 | private ["_pos","_players"]; 7 | 8 | params [ 9 | ["_obj", objNull, [objNull]], 10 | ["_distance", 0, [0]] 11 | ]; 12 | 13 | _pos = getPosATL _obj; 14 | 15 | // ==================================================================================== 16 | 17 | // Create a list of all players 18 | _players = playableUnits select {isPlayer _x}; 19 | 20 | // ==================================================================================== 21 | 22 | // Check whether a player is in the given distance - return true if yes 23 | if (({_x distance _pos < _distance} count _players) > 0) exitWith {true}; 24 | false 25 | -------------------------------------------------------------------------------- /f/FTMemberMarkers/fn_GetMarkerColor.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Convert teamcolors to markercolor. 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // Description: Converts group team colors to Marker colors 4 | // Parameters 5 | // 0: String (MAIN,RED,GREEN,BLUE,YELLOW) 6 | // Returns: 7 | // 0: String (ColorWhite,ColorRed,ColorGreen,ColorBlue,ColorYellow) 8 | // Example: 9 | // ["MAIN"] call f_fnc_GetMarkerColor; 10 | // 11 | // ==================================================================================== 12 | params [["_team", "MAIN", [""]]]; 13 | 14 | private _color = "ColorWhite"; 15 | switch (_team) do 16 | { 17 | case "MAIN": {_color = "ColorWhite"}; 18 | case "RED": {_color = "ColorRed"}; 19 | case "GREEN": {_color = "ColorGreen"}; 20 | case "BLUE": {_color = "ColorBlue"}; 21 | case "YELLOW": {_color = "ColorYellow"}; 22 | }; 23 | _color 24 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_credits.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // NOTES: CREDITS 6 | // The code below creates the Credits sub-section of notes. 7 | 8 | // Note: 9 | // If you (missionmaker) do not want to use the editor author name, you can 10 | // simply replace %1 here with your name or change "_str_made_by" entirely. 11 | private _str_made_by = "Created by %1."; 12 | 13 | private _text = format["%1

", briefingName]; 14 | _text = _text + format[_str_made_by, getMissionConfigValue ["Author", ""]]; 15 | _text = _text + format["

Made with FA3 version %1", getMissionConfigValue ["fa3_version", [0,0,0]] joinString "."]; 16 | 17 | player createDiaryRecord ["diary", ["Credits", _text]]; 18 | -------------------------------------------------------------------------------- /f/zeus/fn_zeusInitLocal.sqf: -------------------------------------------------------------------------------- 1 | // F3 Zeus Support - Add Addons 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | params [ 6 | ["_curator", objNull] 7 | ]; 8 | 9 | //if (! local _curator) exitWith {}; 10 | 11 | private _curatorEH = _curator getVariable ["f_curator_EH", -1]; 12 | if (_curatorEH != -1) exitWith {}; 13 | 14 | // Add event-handler: 15 | _curatorEH = _curator addEventHandler ['CuratorObjectPlaced',{ 16 | 17 | params[ 18 | ["_curator", objNull, [objNull]], 19 | ["_entity", objNull, [objNull]] 20 | ]; 21 | { 22 | [_x] call f_fnc_setAISkill; 23 | } forEach crew _entity; 24 | if(!isNil "f_var_disableThermals_enabled" && {f_var_disableThermals_enabled}) then { 25 | _entity disableTIEquipment true; 26 | }; 27 | }]; 28 | _curator setVariable ["f_curator_EH", _curatorEH]; 29 | -------------------------------------------------------------------------------- /f/spect/fn_activateSpectator.sqf: -------------------------------------------------------------------------------- 1 | if (f_param_debugMode == 1) then { 2 | diag_log "activating spectator"; 3 | }; 4 | 5 | // 'Cinematic' delay before spectator activates 6 | sleep 3; 7 | 8 | // Disable post-processing effects 9 | // Borrowed from BIS_fnc_respawnSpectator 10 | waitUntil {missionnamespace getvariable ["BIS_fnc_feedback_allowDeathScreen", true]}; 11 | BIS_fnc_feedback_allowPP = false; 12 | 13 | // Create a new (alive) unit to prevent draw3D bug with floating head tags 14 | // Credit to SilentSpike: https://github.com/acemod/ACE3/pull/5868 15 | private _cameraUnit = (createGroup sideLogic) createUnit ["VirtualMan_F", player, [], 0, "NONE"]; 16 | _cameraUnit enableSimulation false; 17 | selectPlayer _cameraUnit; 18 | 19 | ["Initialize", [player, [], true, true, true, false, true, true, true, true]] call BIS_fnc_EGSpectator; 20 | 21 | // Disable direct chat to prevent ghosts interacting with the living 22 | 5 enableChannel false; -------------------------------------------------------------------------------- /ws_fnc/Tools/fn_collectMarkers.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_collectMarkers 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | 4 | FEATURE 5 | Collect all existing markers based on the parsed naming scheme 6 | 7 | USAGE 8 | ["markerName"] call ws_fnc_collectMarkers 9 | 10 | RETURNS 11 | Array of all existing markers 12 | 13 | PARAMETERS 14 | 1. Marker name (string) - must be name all other markers are based on. 15 | 16 | EXAMPLE 17 | ["mkrCache","mkrHouse"] call ws_fnc_collectMarkers - returns an array with all markers named mkrCache and mkrHouse ["mkrCache","mkrCache_1","mkrCache_2","mkrHouse_Defend","mkrHouse_Hold"] 18 | */ 19 | 20 | private ["_arr", "_marker"]; 21 | 22 | _arr = []; 23 | 24 | if (!(_this isEqualType [])) then { 25 | _this = [_this]; 26 | }; 27 | 28 | { 29 | _marker = _x; 30 | { 31 | if (_x find _marker != -1) then { 32 | _arr append [_x]; 33 | }; 34 | } forEach allMapMarkers; 35 | } forEach _this; 36 | 37 | _arr 38 | -------------------------------------------------------------------------------- /ws_fnc/Tools/fn_collectObjects.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_collectObjects 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | 4 | FEATURE 5 | Collects all existing objects that contain the strings parsed. 6 | 7 | NOTE 8 | This command can be taxing in missions with a lot of objects. Use collectObjectsNum alternatively. 9 | 10 | USAGE 11 | ["Name1","Name2"] call ws_fnc_collectObjects 12 | 13 | RETURNS 14 | Array of all existing objects that share the name 15 | 16 | PARAMETERS 17 | String - must be part of all object names that should be collected 18 | 19 | EXAMPLE 20 | ["Cache","Church"] call ws_fnc_collectObjects - returns an array with all objects with "Cache" and "Church" in their name: [Cache,Cache_1,Cache_2,Church_Attack,Church_Hold] 21 | */ 22 | 23 | private ["_arr", "_obj"]; 24 | 25 | _arr = []; 26 | 27 | { 28 | _obj = _x; 29 | { 30 | if (((format ["%1",_x]) find _obj) != -1) then { 31 | _arr append [_x]; 32 | }; 33 | } forEach allMissionObjects "ALL"; 34 | } forEach _this; 35 | 36 | _arr 37 | -------------------------------------------------------------------------------- /f/common/fn_setVirtualFaction.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Set Virtual Faction Function 2 | // Scope: Argument Global, Effect Local 3 | // Credits: Please see the FA3 online manual (https://github.com/folkarps/F3/wiki) 4 | // ==================================================================================== 5 | 6 | // DECLARE VARIABLES AND FUNCTIONS 7 | 8 | private ["_obj", "_virtualFactionName"]; 9 | 10 | // SET KEY VARIABLES 11 | // Using the arguments passed to the script, we first define some local variables. 12 | 13 | params [ 14 | ["_obj", objNull, [objNull]], 15 | ["_virtualFactionName", "", [""]] 16 | ]; 17 | 18 | // SPECIAL CASE: UNSET VIRTUAL FACTION 19 | // Unset the virtual faction name when the passed name if the empty string 20 | if (_virtualFactionName == "") exitWith { 21 | _obj setVariable ["f_var_internal_virtualFactionName", nil]; 22 | }; 23 | 24 | // SET VIRTUAL FACTION 25 | // Set the case-insensitive virtual faction name variable of the object. 26 | _obj setVariable ["f_var_internal_virtualFactionName", toLower _virtualFactionName]; 27 | -------------------------------------------------------------------------------- /f/mpEnd/fn_mpEnd.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Multiplayer Ending Controller 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // DECLARE VARIABLES AND FUNCTIONS 6 | // Not used. 7 | 8 | // ==================================================================================== 9 | 10 | // SERVER CHECK 11 | // Make sure that the script is only run on the server 12 | 13 | if (!isServer) exitWith {}; 14 | 15 | // SET ENDING & BROADCAST 16 | // The desired ending # is taken from the arguments passed to this script. 17 | // Using remoteExec the function mpEndReceiver is being spawned on all clients (and server), 18 | // with the passed ending # as parameter. 19 | // Once an ending has been triggered, no other ending is possible. 20 | 21 | if (isNil "f_var_EndingTriggered") then { 22 | _this remoteExec ["f_fnc_mpEndReceiver", 0]; 23 | }; 24 | f_var_EndingTriggered = true; 25 | 26 | // ==================================================================================== 27 | -------------------------------------------------------------------------------- /ws_fnc/effects/fn_createOrdnance.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_createOrdnance 2 | 3 | FEATURE 4 | Creates Ordnance over the given area 5 | 6 | USAGE 7 | [position,type] call ws_fnc_createOrdnance 8 | 9 | PARAMETERS 10 | 1. Center of ordnance strike (can be unit, marker or position) | MANDATORY 11 | 2. Class of ordnance - any type of artillery ammo | MANDATORY 12 | 13 | AMMO TYPES (examples): 14 | "Sh_82mm_AMOS" - HE mortar 15 | "Sh_155mm_AMOS_LG" - 155mm artillery 16 | "R_230mm_HE" - 230mm HE rocket 17 | 18 | RETURNS 19 | true 20 | */ 21 | 22 | private ["_dummy"]; 23 | 24 | params [ 25 | ["_pos", objNull, ["", objNull, grpNull, locationNull, []]], 26 | ["_class", "", [""]] 27 | ]; 28 | 29 | _pos = _pos call ws_fnc_getEpos; 30 | 31 | _dummy = "LaserTargetCBase" createVehicle _pos; 32 | _dummy enableSimulation false; 33 | _dummy hideObject true; 34 | _dummy setVariable ["type",_class]; 35 | 36 | [_dummy,nil,true] call BIS_fnc_moduleProjectile; 37 | 38 | [_dummy] spawn { 39 | params [["_object", objNull, [objNull]]]; 40 | sleep 10; 41 | deleteVehicle _object; 42 | }; 43 | 44 | true 45 | -------------------------------------------------------------------------------- /f/safeStart/f_safeStart.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Safe Start 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | // This script inits the Mission Timer and the Safe Start, has the server setup the publicVariable 5 | // while the client waits, sets units invincibility and displays hints, then disables it. 6 | 7 | //Setup the variables 8 | if (isNil "f_param_mission_timer") then { 9 | f_param_mission_timer = ["f_param_mission_timer",0] call BIS_fnc_getParamValue; 10 | }; 11 | 12 | // ==================================================================================== 13 | 14 | // BEGIN SAFE-START LOOP 15 | // If a value was set for the mission-timer, begin the safe-start loop and turn on invincibility 16 | 17 | if (f_param_mission_timer > 0) then 18 | { 19 | // The server will handle the loop and notifications 20 | if (isServer) then { 21 | [] execVM "f\safeStart\f_safeStartLoop.sqf"; 22 | }; 23 | 24 | // Enable invincibility for players 25 | if (!isDedicated) then { 26 | [true] call f_fnc_safety; 27 | }; 28 | }; -------------------------------------------------------------------------------- /ws_fnc/README.md: -------------------------------------------------------------------------------- 1 | ws_fnc for ArmA3 2 | == 3 | Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 4 | 5 | **INTRODUCTION** 6 | 7 | This is a collection of various functions I have written and am writing for my Arma 3 missions. 8 | None of them are revolutionary but all of them have been designed with efficiency and performance in mind. 9 | The idea is to reduce the need for repetitive scripting as much as possible while avoiding the need for third-party scripts and the problems that come with that. 10 | I've also tried and comment everything as best as possible to make understanding the code easier. 11 | 12 | 13 | **SETUP & DOCUMENTANTION** 14 | 15 | Installation-guides and further documentation can be found on the wiki: 16 | https://github.com/Wolfenswan/ws_fnc/wiki 17 | 18 | * All major functions are documented in themselves. To see how they work open their .sqf with a text editor or their pages on github. 19 | 20 | * If you're running ArmA 3 then you can browse them from inside the editor by opening the function viewer (CTRL+F). Make sure to select "missionConfigFile" in the top-left drop-down menu. 21 | 22 | -------------------------------------------------------------------------------- /ws_fnc/getPos/fn_getBpos.sqf: -------------------------------------------------------------------------------- 1 | /* WS_fnc_getBpos 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | Thanks to Rommel's CBA_fnc_taskDefend and Binesi's improved BIS_fnc_taskDefend 4 | 5 | FEATURE 6 | Collect all building positions for a building. 7 | Assign array variable (ws_bpos) to building containing all valid building positions. 8 | 9 | USAGE 10 | [building] call ws_fnc_getBpos 11 | 12 | RETURNS 13 | array containing all building positions 14 | */ 15 | 16 | private ["_debug","_bposarray","_mkr"]; 17 | _debug = false; if !(isNil "ws_debug") then {_debug = ws_debug}; 18 | 19 | params [ 20 | ["_building", objNull, [objNull]] 21 | ]; 22 | 23 | if isNil "_building" exitWith {}; 24 | _bposarray = _building getVariable ["ws_bPos",false]; 25 | 26 | if (!(_bposarray isEqualType [])) then { 27 | 28 | _bposarray = _building buildingPos -1; 29 | 30 | if (_debug) then {{_mkr = createMarker [format ["%1-bpos",_x],_x];_mkr setMarkerSize [0.3,0.3];_mkr setMarkerType "mil_dot";_mkr setMarkerColor "ColorWhite";} forEach _bposarray;}; 31 | 32 | _building setVariable ["ws_bPos",_bposarray,true]; 33 | }; 34 | 35 | _bposarray 36 | -------------------------------------------------------------------------------- /f/fcs/fn_fcsLocalWarning.sqf: -------------------------------------------------------------------------------- 1 | // F3 - FCS/Commander's Override system 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // Originally from: https://github.com/NikkoJT/njt_fcs (integrated with permission) 4 | 5 | // This function shows HUD indicators when the commander's override either lacks a target or is in operation. 6 | 7 | params ["_text","_delay",["_position",0]]; 8 | 9 | disableSerialization; 10 | 11 | private _coords = [ 12 | [0.5, 0.7,0.5,0.5], // Default below centre 13 | [0.5, 0.77,0.5,0.5], // Lower below centre 14 | [0.55, 0.4,0.5,0.5] // Right of reticle 15 | ] select _position; 16 | 17 | if (cameraView == "GUNNER") then { 18 | private _overrideWarningDisplay = findDisplay 46 ctrlCreate ["RscStructuredText", 4404]; 19 | _overrideWarningDisplay ctrlSetPosition _coords; 20 | _overrideWarningDisplay ctrlSetStructuredText parseText ("" + _text + ""); 21 | _overrideWarningDisplay ctrlSetTextColor [1,0.1,0.1,1]; 22 | _overrideWarningDisplay ctrlSetFont "PuristaBold"; 23 | _overrideWarningDisplay ctrlCommit 0; 24 | sleep _delay; 25 | ctrlDelete _overrideWarningDisplay; 26 | }; -------------------------------------------------------------------------------- /f/missionConditions/fn_ColdBreath.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Cold Breath 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | { 6 | _x spawn { 7 | while {alive _this} do { 8 | sleep (4*(1 - getFatigue _this) + random 1); 9 | drop [["\A3\data_f\ParticleEffects\Universal\Universal", 16, 12, 8,1], "", "Billboard", 1, 10 | (1-((vectorMagnitude velocity _this) / 35)) *.75 max .05, 11 | _this selectionPosition "Head" vectorAdd [0,.02,0], 12 | velocityModelSpace _this vectorAdd [0, .1, 0], 1, 1.3, 1, .01, [.1,.25,.33,.4], [[1, 1, 1, 0.25],[1, 1, 1, 0]], [1], 1, 0, "", "", _this]; 13 | drop [["\A3\data_f\ParticleEffects\Universal\Universal", 16, 12, 8,1], "", "Billboard", 1, 14 | (1-((vectorMagnitude velocity _this) / 35)) *.75 max .05, 15 | _this selectionPosition "Head" vectorAdd [0,.02,0], 16 | velocityModelSpace _this vectorAdd [0, .15, 0], 1, 1.3, 1, .01, [.1,.22,.3,.35], [[1, 1, 1, 0.25],[1, 1, 1, 0]], [1], 1, 0, "", "", _this]; 17 | }; 18 | }; 19 | } forEach allUnits; 20 | -------------------------------------------------------------------------------- /ws_fnc/misc/fn_showIntro.sqf: -------------------------------------------------------------------------------- 1 | // ws_fnc_showIntro 2 | // By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | /* 4 | FEATURE 5 | Show an intro text using BIS_fnc_typeText. 6 | It displays two paragraphs of text and the current date & time in the third. 7 | 8 | USAGE 9 | ["string1","string2"] call ws_fnc_showIntro 10 | 11 | PARAMETERS 12 | 1. The string in the first paragraph | MANDATORY 13 | 1. The string in the second paragraph | MANDATORY 14 | 15 | RETURNS 16 | true 17 | 18 | NOTE 19 | ARMA 3 only 20 | */ 21 | 22 | private _game = [] call ws_fnc_gameCheck; 23 | if !(ws_game_a3) exitWith {["ws_fnc_showIntro DBG: Game version: ",[_game]," Must be ARMA 3!"] call ws_fnc_debugtext}; 24 | 25 | params [ 26 | ["_string1", "", [""]], 27 | ["_string2", "", [""]] 28 | ]; 29 | 30 | [ 31 | [ 32 | [_string1, "%1
",5], 33 | [_string2, "%1
",5], 34 | [format ["%3/%2/%1 %4:%5",date select 0, date select 1, date select 2,date select 3, date select 4],"%1",10] 35 | ] , 0, 0.7 36 | ] spawn BIS_fnc_typeText; 37 | 38 | true 39 | -------------------------------------------------------------------------------- /ws_fnc/getPos/fn_NearestLandPos.sqf: -------------------------------------------------------------------------------- 1 | /* ws_fnc_NearestLandPos 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | 4 | USAGE 5 | [pos] call ws_fnc_NearestLandPos 6 | [pos,distance,increment] call ws_fnc_NearestLandPos 7 | 8 | FEATURE 9 | Return nearest pos on dry land in distance x (default 10), If no position is found increase by increment x (default 50) 10 | If no dry land in radius increment*50 is found the original position is returned and an error put out. 11 | 12 | RETURNS 13 | positional array 14 | */ 15 | 16 | private ["_i","_done","_pos2"]; 17 | 18 | params [ 19 | ["_pos", [0,0,0], [[]], [2,3]], 20 | ["_distance", 10, [0]], 21 | ["_increment", 50, [0]] 22 | ]; 23 | 24 | _i = 0; 25 | _done = false; 26 | 27 | if !(surfaceIsWater _pos) exitWith {_pos}; 28 | 29 | while {!_done && _i <= 50} do { 30 | _distance = _distance + _increment; 31 | for "_x" from 0 to 340 step 20 do { 32 | _pos2 = _pos vectorAdd [_distance * sin _x, _distance * cos _x, 0]; 33 | if !(surfaceIsWater _pos2) exitWith {_pos = _pos2;_done = true}; 34 | }; 35 | _i = _i + 1; 36 | if (_i == 50) exitWith {["ws_fnc_NearestLandPos ERROR: No dry land found in radius of",_distance,""] call ws_fnc_DebugText}; 37 | }; 38 | 39 | _pos 40 | -------------------------------------------------------------------------------- /ws_fnc/effects/fn_createCAS.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_createCAS 2 | 3 | FEATURE 4 | Creates a CAS run at the given location 5 | 6 | USAGE 7 | MinimaL: 8 | [position,direction] call ws_fnc_createCAS 9 | 10 | PARAMETERS 11 | 1. Center of CAS run (can be unit, marker or position) | MANDATORY 12 | 2. Direction for CAS to strafe towards | MANDATORY 13 | 3. Type of CAS run. 0: Guns only. 1: Rockets only. 2: Both. | OPTIONAL - default is 0 14 | 4. Class of CAS plane to send. | OPTIONAL - default is Wipeout 15 | 16 | RETURNS 17 | true 18 | */ 19 | 20 | private ["_dummy"]; 21 | 22 | params [ 23 | ["_pos", objNull, ["", objNull, grpNull, locationNull, []]], 24 | ["_dir", 0, [0]], 25 | ["_type", 0, [0]], 26 | ["_class", "B_Plane_CAS_01_F", [""]] 27 | ]; 28 | 29 | _pos = _pos call ws_fnc_getEpos; 30 | 31 | _dummy = "LaserTargetCBase" createVehicle _pos; 32 | _dummy enableSimulationGlobal false; _dummy hideObjectGlobal true; 33 | _dummy setVariable ["vehicle",_class]; 34 | _dummy setVariable ["type",_type]; 35 | _dummy setDir _dir; 36 | 37 | [_dummy,nil,true] call BIS_fnc_moduleCAS; 38 | 39 | [_dummy] spawn { 40 | params [["_object", objNull, [objNull]]]; 41 | sleep 10; 42 | deleteVehicle _object; 43 | }; 44 | 45 | true 46 | -------------------------------------------------------------------------------- /ws_fnc/misc/fn_broadcast.sqf: -------------------------------------------------------------------------------- 1 | // ws_fnc_broadcast 2 | // By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | /* 4 | FEATURE 5 | Broadcast a string to all clients 6 | 7 | USAGE 8 | ["message"] call ws_fnc_broadcast 9 | ["message","type of text","display type"] call ws_fnc_broadcast | See https://community.bistudio.com/wiki/titleText for valid types 10 | 11 | PARAMETERS 12 | 1. The string to be displayed | MANDATORY 13 | 2. The type of text (titleText or cutText) |OPTIONAL - default is cutText. 14 | 3. The display type | OPTIONAL - default is PLAIN. See http://community.bistudio.com/wiki/titleText for options 15 | 16 | NOTE 17 | ARMA 3 only 18 | */ 19 | 20 | private ["_game", "_code"]; 21 | 22 | _game = [] call ws_fnc_gameCheck; 23 | if !(ws_game_a3) exitWith {["ws_fnc_broadcast DBG: Game version: ",[_game]," Must be ARMA 3!"] call ws_fnc_debugtext}; 24 | 25 | params [ 26 | ["_string", "ws_fnc_broadcast DBG: No string parsed", [""]], 27 | ["_text", "cutText", [""]], 28 | ["_type", "PLAIN", [""]] 29 | ]; 30 | _code = format ["%1 [%2,%3]",_text,str _string,str _type]; 31 | 32 | ws_fnc_showText = compile _code; 33 | 34 | [] remoteExec ["ws_fnc_showText", 0]; 35 | 36 | _code = ""; 37 | ws_fnc_showText = compile _code; 38 | -------------------------------------------------------------------------------- /ws_fnc/getPos/fn_NearestRoadPos.sqf: -------------------------------------------------------------------------------- 1 | /* ws_fnc_NearestRoadPos 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | 4 | USAGE 5 | [pos] call ws_fnc_NearestRoadPos 6 | [pos,distance,increment] call ws_fnc_NearestRoadPos 7 | 8 | FEATURE 9 | Return nearest road in distance x (default 10), If no road is found increase by increment x (default 50) 10 | If no roads in radius increment*20 are found the original position is returned and an error put out. 11 | 12 | RETURNS 13 | positional array 14 | */ 15 | 16 | private ["_i","_roads","_done"]; 17 | 18 | params [ 19 | ["_pos", objNull, ["", objNull, grpNull, locationNull, []]], 20 | ["_distance", 10, [0]], 21 | ["_increment", 50, [0]] 22 | ]; 23 | 24 | _pos = _pos call ws_fnc_getEPos; 25 | 26 | _i = 0; 27 | _done = false; 28 | 29 | while {!_done && _i <= 20} do { 30 | _roads = _pos nearroads _distance; 31 | if (count _roads > 0) then { 32 | _pos = getPosATL (selectRandom _roads); 33 | _done = true; 34 | } else { 35 | _distance = _distance + _increment; 36 | _i = _i + 1; 37 | if (_i == 20) exitWith {["ws_fnc_NearestRoadPos ERROR: No roads found in radius of",(_increment*20),""] call ws_fnc_DebugText}; 38 | }; 39 | }; 40 | 41 | [_pos select 0,_pos select 1,0] 42 | -------------------------------------------------------------------------------- /f/safeStart/fn_safety.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Safe Start, Safety Toggle 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | //===================================================================================== 4 | 5 | //Exit if server 6 | if(isDedicated) exitwith {}; 7 | 8 | params [["_enableSafeStart", true, [true]]]; 9 | 10 | switch (_enableSafeStart) do 11 | { 12 | //Turn safety on 13 | case true: 14 | { 15 | // Disable damage for vehicles if player is crewing a vehicle 16 | if (vehicle player != player && {player in [gunner vehicle player,driver vehicle player,commander vehicle player]}) then { 17 | player setVariable ["f_var_safetyVeh",vehicle player]; 18 | (player getVariable "f_var_safetyVeh") allowDamage false; 19 | }; 20 | 21 | // Make player invincible 22 | player allowDamage false; 23 | }; 24 | 25 | //Turn safety off 26 | case false; 27 | default { 28 | // Re-enable damage for vehicles if it was disabled 29 | if !(isNull(player getVariable ["f_var_safetyVeh",objnull])) then { 30 | (player getVariable "f_var_safetyVeh") allowDamage true; 31 | player setVariable ["f_var_safetyVeh",nil]; 32 | }; 33 | 34 | // Make player vulnerable 35 | player allowDamage true; 36 | }; 37 | }; 38 | -------------------------------------------------------------------------------- /ws_fnc/Tools/fn_setGVar.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_setGVar 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | 4 | FEATURE 5 | Sets a global variable to the passed value. If the variable is nil it is initialized 6 | 7 | USAGE 8 | Minimal 9 | ["variable",value] call ws_fnc_setGVar 10 | 11 | Full 12 | ["variable",value,bool,bool] call ws_fnc_setGVar 13 | 14 | PARAMETERS 15 | 1. Variable to check | MANDATORY - string 16 | 2. Value to set if variable is nil | MANDATORY - any value 17 | 3. Whether to pub-var the variable after it was set | OPTIONAL - bool (default: false) 18 | 4. Whether to set the variable even if it is not nil | OPTIONAL - bool (default: false) 19 | 20 | RETURNS 21 | nothing 22 | */ 23 | 24 | private ["_debug"]; 25 | 26 | params [ 27 | ["_var", "", [""]], 28 | ["_val", 0], 29 | ["_pub", false, [false]], 30 | ["_force", false, [false]] 31 | ]; 32 | 33 | _debug = if !(isNil "ws_debug") then [{ws_debug},{false}]; 34 | 35 | if (!isNil _var && !_force) exitWith { 36 | if (_debug) then { 37 | ["ws_fnc_setGVar: Passed var is not nil:",[_var,_val],""] call ws_fnc_debugText; 38 | }; 39 | }; 40 | 41 | call compile Format ["%1 = %2",_var,_val]; 42 | 43 | if (_pub) then { 44 | call compile format ["publicVariable '%1'",_var]; 45 | }; 46 | -------------------------------------------------------------------------------- /f/common/fn_processParamsArray.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Process ParamsArray 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | //Testing has shown that paramArrays only exists on the server during preInit 6 | //The publicVariable will synchronize the value to the clients. 7 | 8 | private ["_paramName", "_paramValue"]; 9 | 10 | //PreInit 11 | if (isServer) then { 12 | if (isNil "f_paramsArray_complete") then { 13 | if (isNil "paramsArray") then { 14 | { 15 | _paramName = (configName _x); 16 | _paramValue = (getNumber (missionConfigFile >> "Params" >> _paramName >> "default")); 17 | missionNamespace setVariable [_paramName,_paramValue]; 18 | publicVariable _paramName; 19 | } forEach ("true" configClasses (missionConfigFile >> "Params")); 20 | } else { 21 | { 22 | _paramName =(configName ((missionConfigFile >> "Params") select _forEachIndex)); 23 | missionNamespace setVariable [_paramName,_x]; 24 | publicVariable _paramName; 25 | } forEach paramsArray; 26 | f_ParamsArray_complete = true; 27 | }; 28 | }; 29 | }; 30 | -------------------------------------------------------------------------------- /ws_fnc/Tools/fn_collectObjectsNum.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_collectObjectsNum 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | 4 | FEATURE 5 | Collects all existing objects that are copies of the original, as indicated by an appended number (Obj,Obj_1,Obj_2 etc.) 6 | 7 | USAGE 8 | [Object1,Object2] call ws_fnc_collectObjectsNum 9 | 10 | RETURNS 11 | Array of all existing objects that share the name 12 | 13 | PARAMETERS 14 | Objects - must be existing and the original object on which the copies are based on 15 | 16 | EXAMPLE 17 | [Cache,Church] call ws_fnc_collectObjectsNum - returns an array with all objects with "Cache" and "Church" and those following in a numeric order: [Cache,Cache_1,Cache_2,Church,Church_1,Church_2] 18 | */ 19 | 20 | private ["_arr", "_i", "_obj"]; 21 | 22 | _arr = []; 23 | 24 | //Start the loop 25 | _i = 0; 26 | 27 | if (!(_this isEqualType [])) then { 28 | _this = [_this]; 29 | }; 30 | 31 | { 32 | while {true} do { 33 | _obj = ""; 34 | 35 | if (_i > 0) then { 36 | _obj = format ["%1_%2",_x,_i]; 37 | } else { 38 | _obj = format ["%1",_x]; 39 | }; 40 | 41 | if (isNil _obj || _i > 500) exitWith {_i = 0;}; 42 | 43 | // If the object exists, add it to the array 44 | call compile format ["_arr append [%1]",_obj]; 45 | _i = _i + 1; 46 | }; 47 | } forEach _this; 48 | 49 | _arr 50 | -------------------------------------------------------------------------------- /ws_fnc/misc/fn_attachIR.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_attachIR 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com 3 | 4 | FEATURE 5 | Attach IR strobe to object. 6 | 7 | RETURNS 8 | true 9 | 10 | USAGE 11 | Minimal: 12 | [object] spawn ws_fnc_attachIR 13 | Full: 14 | [object, attachPoint, memoryPoint] spawn ws_fnc_attachIR 15 | 16 | PARAMETERS 17 | 1. Object to attach chem to (object) | MANDATORY 18 | 2. Offset for attach from center (array in [x,y,z]) | OPTIONAL - default is [0,0,0] 19 | 3. MemoryPoint to attach to (string | OPTIONAL - see http://resources.bisimulations.com/wiki/Named_Selection and https://community.bistudio.com/wiki/ArmA:_Selection_Translations for memory points. Not all work. 20 | 21 | EXAMPLES 22 | [UnitNATO_CO,[-0.05,0.05,0.1],"Spine3"] spawn ws_fnc_attachIR - attaches an IR to the left shoulder of UnitNATO_CO 23 | */ 24 | 25 | private ["_class","_ir"]; 26 | 27 | params [ 28 | ["_obj", objNull, [objNull]], 29 | ["_offset", [0,0,0], [[]], 3], 30 | ["_mpoint", "", [""]] 31 | ]; 32 | 33 | switch (side _obj) do { 34 | case west: {_class = "B_IRStrobe";}; 35 | case east: {_class = "O_IRStrobe";}; 36 | default {_class = "I_IRStrobe";}; 37 | }; 38 | 39 | _ir = _class createVehicle [0,0,0]; 40 | _ir attachTo [_obj, _offset, _mpoint]; 41 | _ir setDir (getDir _obj); 42 | _ir setVectorDir (vectorDir _obj); 43 | _ir setVectorUp (vectorUp _obj); 44 | 45 | true; 46 | -------------------------------------------------------------------------------- /ws_fnc/misc/fn_attachLight.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_attachLight 2 | // By Wolfenswan: wolfenswanarps@gmail.com 3 | // See: http://forums.bistudio.com/showthread.php?93588-attach-flare-to-an-object&p=1541513&viewfull=1#post1541513 4 | 5 | FEATURE 6 | Attach light source to object. 7 | 8 | RETURNS 9 | true 10 | 11 | USAGE 12 | Minimal: 13 | [object] call ws_fnc_attachLight 14 | Full: 15 | [object, brightness, color, haze, attachpoint] call ws_fnc_attachLight 16 | 17 | PARAMETERS 18 | 1. Object to attach light to | MANDATORY 19 | 2. Brightness of light source (0-1) | OPTIONAL - default is 0.6 20 | 3. Color of light (array with [0-1,0-1,0-1] for [r,g,b]) | OPTIONAL - default is [1.0,1.0,1.0] 21 | 4. Haze of the light (array with [0-1,0-1,0-1] for [r,g,b]) | OPTIONAL - default is [1.0, 0.2, 0.2] 22 | 5. Attachpoint of the light (offset to the object it is attached to as array [x,y,z]) | OPTIONAL - default is [0,0,0] 23 | */ 24 | 25 | params [ 26 | ["_obj", objNull, [objNull]], 27 | ["_brightness", 0.6, [0]], 28 | ["_color", [1.0, 1.0, 1.0], [[]], 3], 29 | ["_haze", [1.0, 0.2, 0.2], [[]], 3], 30 | ["_offset", [0,0,0], [[]], 3] 31 | ]; 32 | 33 | private _flare = "#lightpoint" createVehicle (getPos _obj); 34 | _flare setLightBrightness _brightness; 35 | _flare setLightAmbient _color; 36 | _flare setLightColor _haze; 37 | _flare lightAttachObject [_obj,_offset]; 38 | 39 | true 40 | -------------------------------------------------------------------------------- /f/fcs/fn_fcsCommanderOverride.sqf: -------------------------------------------------------------------------------- 1 | // F3 - FCS/Commander's Override system 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // Originally from: https://github.com/NikkoJT/njt_fcs (integrated with permission) 4 | 5 | // This function is called when the commander issues a TC override from the action defined in fcs_init 6 | 7 | params ["_vehicle","_caller"]; 8 | 9 | // If there's no valid target under the commander's crosshair, tell them and do nothing else 10 | if (isNull cursorObject) then { 11 | ["NO TARGET",1] remoteExec ["f_fnc_fcsLocalWarning",commander _vehicle]; 12 | } else { 13 | // Get the position of the centre of the targeted object at the time of the override 14 | _overrideTarget = (cursorObject modelToWorldWorld (boundingCenter cursorObject)); 15 | // Order the gunner to aim their camera at the target position 16 | [_vehicle,[_overrideTarget,_vehicle unitTurret (gunner _vehicle),true]] remoteExec ["lockCameraTo",gunner _vehicle]; 17 | // Display a HUD indicator for the gunner 18 | ["TC OVERRIDE",2] remoteExec ["f_fnc_fcsLocalWarning",gunner _vehicle]; 19 | // Handle cooldown on override 20 | _vehicle setVariable ["f_var_fcsCommanderOverride_cooldown",true,true]; 21 | sleep 4; 22 | [_vehicle,[objNull,_vehicle unitTurret (gunner _vehicle),true]] remoteExec ["lockCameraTo",gunner _vehicle]; 23 | _vehicle setVariable ["f_var_fcsCommanderOverride_cooldown",false,true]; 24 | }; -------------------------------------------------------------------------------- /f/medical/fn_addDragAction.sqf: -------------------------------------------------------------------------------- 1 | #include "\a3\functions_f_mp_mark\Revive\defines.inc" 2 | 3 | params ["_unit"]; 4 | 5 | if (!hasInterface) exitWith {}; 6 | waitUntil {sleep 0.1; !isNull player}; 7 | if (_unit == player) exitWith {}; 8 | if (_unit getVariable ["#revDragId", -1] != -1) exitWith {}; 9 | 10 | private _drag_action_cond = str { 11 | //_target (object to which action is attached to) 12 | // _this (caller/executing person) 13 | _target distance _this < 2 && { 14 | GET_STATE(_target) == STATE_INCAPACITATED && { 15 | !(_target getVariable ['f_wound_being_dragged',false]) 16 | } 17 | } 18 | }; 19 | //hacky method to remove the braces at the beginning and end, so that it's the format that addAction expects. 20 | _drag_action_cond = _drag_action_cond select [1, count _drag_action_cond - 2]; 21 | 22 | private _drag_exec_code = { 23 | params [ 24 | ["_target", objNull, [objNull]], 25 | ["_caller", objNull, [objNull]], 26 | ["_ID", -1, [0]], 27 | ["_arguments", nil] 28 | ]; 29 | _this remoteExec ["f_fnc_OnDrag", [_caller]]; //Dragger 30 | _this remoteExec ["f_fnc_OnDrag", [_target]]; //Target 31 | }; 32 | 33 | private _resultId = _unit addAction [ 34 | format ["Drag %1", name _unit], 35 | 36 | // "_this" variable (in the code below) is: [target, caller, ID, arguments] 37 | _drag_exec_code, 38 | nil, 39 | 6, 40 | false, 41 | true, 42 | "", 43 | _drag_action_cond 44 | ]; 45 | _unit setVariable ['#revDragId', _resultId]; 46 | -------------------------------------------------------------------------------- /f/brakeOverride/fn_brakeOverride.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Driver's Brake Override system 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | /* 4 | This component allows players to disable the automatic brakes of any ground vehicle they're driving. It is enabled by default in init.sqf. 5 | */ 6 | 7 | // Don't add the action if it's already got one 8 | if (player getVariable ["f_var_hasDriverAction",false]) exitWith { diag_log "brakeOverride: tried to add driver action on something that already has it"}; 9 | 10 | // Add the action 11 | player addAction [ 12 | "Disable automatic brakes (brake to re-engage)", 13 | { 14 | params ["_target", "_caller", "_actionId", "_arguments"]; 15 | [vehicle _target,true] remoteExec ["disableBrakes",vehicle _target]; 16 | }, 17 | "", 18 | 10, 19 | false, 20 | true, 21 | "", 22 | "(driver (vehicle _this) == _this) && {(!brakesDisabled vehicle _this) && ((vehicle _this) isKindOf 'LandVehicle') && !((vehicle _this) isKindOf 'StaticWeapon')}" 23 | ]; 24 | 25 | // Add the variable to prove it's already done 26 | player setVariable ["f_var_hasDriverAction",true]; 27 | 28 | // Add an event handler to the server that can catch JIP/reslots 29 | if isServer then { 30 | addMissionEventHandler ["PlayerConnected", 31 | { 32 | params ["_id", "_uid", "_name", "_jip", "_owner", "_idstr"]; 33 | if (_jip) then { 34 | [] remoteExec ["f_fnc_brakeOverride",_owner]; 35 | }; 36 | }]; 37 | }; -------------------------------------------------------------------------------- /ws_fnc/Dbg/fn_typecheck.sqf: -------------------------------------------------------------------------------- 1 | //ws_fnc_typecheck 2 | //[variable to check,[array of expected types],descriptive string] call ws_fnc_typecheck; 3 | //returns true when type is wrong or variable is nil 4 | 5 | private ["_typenames","_false_types","_error"]; 6 | 7 | params [ 8 | ["_variable", nil], 9 | ["_check_array", [], [[]]], 10 | ["_scriptname", "", [""]] 11 | ]; 12 | 13 | //All possible typenames. http://community.bistudio.com/wiki/typeName 14 | _typenames = ["ARRAY","BOOL","CODE","CONFIG","CONTROL","DISPLAY","GROUP","LOCATION","OBJECT","SCALAR","SCRIPT","SIDE","STRING","TEXT"]; 15 | _false_types = _typenames - _check_array; 16 | _error = false; 17 | 18 | if (isNil {_variable}) exitWith { 19 | player sidechat format ["ws_fnc_typecheck: ERROR. _variable %1 parsed by %2 is NIL when it should be in %3 !",_variable,_scriptname,_check_array]; 20 | diag_log format ["ws_fnc_typecheck: ERROR. _variable %1 parsed by %2 is NIL when it should be in %3 !",_variable,_scriptname,_check_array]; 21 | _error = true; 22 | }; 23 | 24 | { 25 | if (typename _variable == toUpper _x) then { 26 | player sidechat format ["ws_fnc_typecheck: ERROR. _variable %1 parsed by %2 is %3 when it should be of %4 !",_variable,_scriptname,format ["%1",_x],_check_array]; 27 | diag_log format ["ws_fnc_typecheck: ERROR. _variable %1 parsed by %2 is %3 when it should be of %4 !",_variable,_scriptname,format ["%1",_x],_check_array]; 28 | _error = true; 29 | }; 30 | } forEach _false_types; 31 | 32 | _error 33 | -------------------------------------------------------------------------------- /f/fcs/fn_fcsPersistentEffects.sqf: -------------------------------------------------------------------------------- 1 | // F3 - FCS/Commander's Override system 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // Originally from: https://github.com/NikkoJT/njt_fcs (integrated with permission) 4 | 5 | // This component handles the FCS failure symptoms, such as the HUD warning and zeroing overrides. It's launched when an FCS failure is determined by the Hit EH added in fcs_init. 6 | 7 | params ["_target"]; 8 | 9 | // It's all a big loop 10 | while {(_target getVariable ["f_var_fcs_failure",false]) && (alive _target)} do { 11 | 12 | // Check whether there is a gunner 13 | if !(isNull (gunner _target)) then { 14 | _currentGunner = gunner _target; 15 | { 16 | // Get the muzzles for every weapon on the main turret and force set their zeroing 17 | private _targetWeapon = _x; 18 | private _targetWeaponMuzzles = getArray (configFile >> "CfgWeapons" >> _x >> "muzzles"); 19 | { 20 | _targetMuzzle = _targetWeapon; 21 | if !(_x == "this") then { 22 | _targetMuzzle = _x; 23 | }; 24 | [_currentGunner,[_targetWeapon,_targetMuzzle,1]] remoteExec ["setWeaponZeroing",_currentGunner]; 25 | } forEach _targetWeaponMuzzles; 26 | } forEach (_target weaponsTurret [0]); 27 | 28 | // Show a visual warning to the gunner - remoteExec'd to be local and only displayed when they are in the optics 29 | ["FCS FAILURE",0.5] remoteExec ["f_fnc_fcsLocalWarning",_currentGunner,false]; 30 | 31 | }; 32 | 33 | sleep 0.8; 34 | 35 | }; 36 | -------------------------------------------------------------------------------- /ws_fnc/Tools/fn_isWallInDir.sqf: -------------------------------------------------------------------------------- 1 | /* ws_fnc_isWallInDir 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | 4 | FEATURE 5 | Checks if object is facing a building wall in given direction, distance and height 6 | 7 | USAGE 8 | Minimal 9 | [Object,direction] call ws_fnc_isWallInDir 10 | 11 | Full 12 | [Object,direction,distance,height] call ws_fnc_isWallInDir 13 | 14 | PARAMETERS 15 | 1. Unit or Object | Mandatory - any object, uses eyepos for "CAMANBASE" 16 | 2. Direction | Mandatory - 0 - 360 17 | 3. Distance | Optional - default 15m 18 | 4. Height | Optional - default 0m 19 | 20 | RETURNS 21 | bool - true if unit is facing a wall, false if unit is outside or facing a window 22 | 23 | EXAMPLES 24 | [TestUnit,GetDir TestUnit] ws_fnc_isWallInDir - returns true if TestUnit is facing a wall 25 | [TestUnit,0,0,25] ws_fnc_isWallInDir - returns true if TestUnit is under a roof 26 | */ 27 | 28 | private ["_pos","_relpos","_posASL","_intersects"]; 29 | 30 | params [ 31 | ["_obj", objNull, [objNull]], 32 | ["_dir", 0, [0]], 33 | ["_dis", 15, [0]], 34 | ["_height", 0, [0]] 35 | ]; 36 | 37 | _pos = getPos _obj; 38 | _posASL = if (_obj isKindOF "CAMANBASE") then [{eyePos _obj},{GetPosASL (_obj)}]; 39 | 40 | _relpos = [_pos select 0,_pos select 1,(_pos select 2) + _height] getPos [_dis, _dir]; 41 | 42 | _intersects = lineIntersectsObjs [_posASL,ATLTOASL _relpos]; 43 | if (count _intersects > 0 && {(({(_x isKindOf "HouseBase" || _x isKindOf "BagBunker_base_F")} count _intersects) > 0)}) then [{true},{false}]; 44 | -------------------------------------------------------------------------------- /f/cache/fn_gCache.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Caching Script Group Cacher 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // LOOP THROUGH THE PASSED UNITS 6 | // We loop through the units of the passed group and disable Simulation for those that are not vehicle drivers and are standing still 7 | 8 | params [ 9 | ["_group", grpNull, [grpNull]], 10 | ["_aggressiveness", f_var_cachingAggressiveness, [0]] 11 | ]; 12 | 13 | { 14 | 15 | // Disable simulation based on aggressiveness 16 | switch (_aggressiveness) do { 17 | 18 | case 1: { 19 | if ((count (assignedVehicleRole _x) == 0 || {"Driver" != (assignedVehicleRole _x) select 0}) && (_x != leader _group)) then { 20 | _x enableSimulationGlobal false; 21 | }; 22 | }; 23 | case 2: { 24 | if (count (assignedVehicleRole _x) == 0 || {"Driver" != (assignedVehicleRole _x) select 0}) then { 25 | if ((_x != leader _group) || (_x == leader _group && speed _x == 0)) then { 26 | _x enableSimulationGlobal false; 27 | }; 28 | }; 29 | }; 30 | case 3: {_x enableSimulationGlobal false;}; 31 | default {systemchat format ["f_fnc_gCache DBG: f_var_cachingAggressiveness is not an accepted value: %1",f_var_cachingAggressiveness];}; 32 | }; 33 | 34 | // All units are hidden 35 | _x hideObjectGlobal true; 36 | 37 | if (_aggressiveness == 3) then { 38 | if (vehicle _x != _x) then { 39 | (vehicle _x) hideObjectGlobal true; 40 | }; 41 | }; 42 | 43 | sleep 0.1; 44 | } forEach units _group; 45 | 46 | true 47 | -------------------------------------------------------------------------------- /ws_fnc/misc/fn_attachChem.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_attachChem 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com 3 | 4 | FEATURE 5 | Attach chemlight to object. 6 | 7 | RETURNS 8 | true 9 | 10 | USAGE 11 | Minimal: 12 | [object,color] spawn ws_fnc_attachChem 13 | Full: 14 | [object, color, duration, attachPoint, memoryPoint] spawn ws_fnc_attachChem 15 | 16 | PARAMETERS 17 | 1. Object to attach chem to (object) | MANDATORY 18 | 2. Color of chemlight (string) | MANDATORY - can be "red","green","blue" or "yellow" 19 | 3. Duration of light (number) | OPTIONAL - default is 0 (infinite) 20 | 4. Offset for attach from center (array in [x,y,z]) | OPTIONAL - default is [0,0,0] 21 | 5. MemoryPoint to attach to (string | OPTIONAL - see http://resources.bisimulations.com/wiki/Named_Selection and https://community.bistudio.com/wiki/ArmA:_Selection_Translations for memory points. Not all work. 22 | 23 | EXAMPLES 24 | [UnitNATO_CO,"red",5,[-0.15,0.05,0.1],"Spine3"] spawn ws_fnc_attachChem; - attaches a chemlight to the left shoulder of UnitNATO_CO 25 | 26 | */ 27 | 28 | params [ 29 | ["_obj", objNull, [objNull]], 30 | ["_color", "red", [""]], 31 | ["_duration", 0, [0]], 32 | ["_offset", [0,0,0], [[]], 3], 33 | ["_mpoint", "", [""]] 34 | ]; 35 | 36 | private _chm = (format ["Chemlight_%1",toLower _color]) createVehicle [0,0,0]; 37 | _chm attachTo [_obj, _offset, _mpoint]; 38 | _chm setDir (getDir _obj); 39 | _chm setVectorDir (vectorDir _obj); 40 | _chm setVectorUp (vectorUp _obj); 41 | 42 | if (_duration > 0) then { 43 | sleep _duration; 44 | deleteVehicle _chm; 45 | }; 46 | 47 | true 48 | -------------------------------------------------------------------------------- /f/setGroupID/f_setGroupIDs.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Set Group IDs 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // Automatically assigns intelligible names to groups 6 | 7 | // SET GROUP IDS 8 | // Execute setGroupID Function for all factions 9 | // Note: The actual group IDs are defined in f/groupMarkers/fn_groupData.sqf 10 | { 11 | _x params ["_grp", "", "", "", "_id"]; 12 | if (_id != "") then { 13 | [_grp, _id] call f_fnc_setGroupID; 14 | } 15 | } forEach f_var_groupData_all; 16 | 17 | // ==================================================================================== 18 | 19 | // Warn if there are groups with playable units that are not present in f_var_groupData_all 20 | // Otherwise groups would show a generic name in the chat and in the ORBAT briefing page. 21 | private _groupDataGroups = f_var_groupData_all apply { 22 | missionNamespace getVariable[_x select 0,grpNull] 23 | } select { 24 | _x isEqualType grpNull && {! (_x isEqualTo grpNull)} 25 | }; 26 | 27 | private _playableGroups = playableUnits select { 28 | roleDescription _x find " Reporter" < 0 29 | } apply {group _x}; 30 | _playableGroups = _playableGroups arrayIntersect _playableGroups; 31 | private _groupsWithoutIDs = _playableGroups select {! (_x in _groupDataGroups)}; 32 | if (count _groupsWithoutIDs > 0) then { 33 | private _msg = format ["ERROR (f_setGroupIDs.sqf): %1 groups have no group ID set: %2", count _groupsWithoutIDs, _groupsWithoutIDs]; 34 | systemChat _msg; 35 | diag_log _msg; 36 | }; 37 | -------------------------------------------------------------------------------- /ws_fnc/effects/fn_createTripflare.sqf: -------------------------------------------------------------------------------- 1 | /* ws_fnc_createTripflare 2 | 3 | FEATURE 4 | Creates illuminated smoke at position 5 | 6 | USAGE 7 | [position,color] spawn ws_fnc_createTripflare 8 | 9 | PARAMETERS 10 | 1. position at which to spawn the flare | MANDATORY - object, array [x,y,z] or marker 11 | 2. color of the smoke | MANDATORY - "red", "green","yellow" or "white" 12 | 13 | NOTE 14 | Function does not check for locality. Wrap your call in an isServer etc. clause if necessary. 15 | 16 | EXAMPLE 17 | if (isServer) then {[thisTrigger,"red"] spawn ws_fnc_createTripflare}; - in a trigger's on activation field will create a tripflare at the trigger's center when the trigger's conditions have been met 18 | */ 19 | 20 | private ["_smk"]; 21 | 22 | params [ 23 | ["_pos", objNull, ["", objNull, grpNull, locationNull, []]], 24 | ["_color", "", [""]] 25 | ]; 26 | 27 | _pos = _pos call ws_fnc_getEpos; 28 | _color = toLower _color; 29 | 30 | if !(_color in ["green","red","yellow","white"]) exitWith {["ws_fnc_tripFlare DBG: ",[_color]," is not one of: [""green"",red","yellow","white""]"] call ws_fnc_debugtext}; 31 | 32 | (format ["F_40mm%1","_"+_color]) createVehicle _pos; 33 | uisleep 0.5; 34 | if (_color == "white") then {_color =""}; 35 | _smk = (format ["Smokeshell%1",_color]) createVehicle _pos; 36 | _smk setVectorUp [1,0,0]; 37 | 38 | while {!isNull _smk} do { 39 | uisleep 21.5; // A flare takes roughly 25seconds to die off. As there's a delay between creating and illumination, the sleep is slightly shorter 40 | if (!isNull _smk) then { 41 | (format ["F_40mm%1","_"+_color]) createVehicle _pos; 42 | }; 43 | uisleep 0.01; 44 | }; 45 | -------------------------------------------------------------------------------- /f/mapClickTeleport/fn_mapClickTeleportBriefing.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Mission Maker Teleport 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | if (!hasInterface) exitWith {}; 6 | 7 | if (!isDedicated && (isNull player)) then 8 | { 9 | waitUntil {sleep 0.1; !isNull player}; 10 | }; 11 | 12 | player createDiaryRecord ["diary", ["HALO Jumping 101", 13 | format ["TL/DR - OPEN YOUR PARACHUTE AT 200 METERS 14 |

15 | A HALO jump consists of three stages: the jump, the decent, and the landing. 16 |

17 | You will jump from a height of %1 meters. 18 |

19 | While descending, steer yourself towards the drop zone - 20 | orient yourself in the direction you want to go, then go forward. 21 |

22 | The recommended open height for a HALO jump is 200 meters. 23 | 100 meters is the absolute minimum. 24 | Anything less than 100 meters and you will not survive. 25 |

26 | When you are getting close to the ground, try to move backwards. 27 | This will slow you down and prevent injuries. 28 |

29 | If you are being paradropped in a vehicle, 30 | you do not need to do anything. Just sit tight and enjoy the descent. 31 | The vehicle will automatically deploy a parachute at an appropriate time. 32 | If you get out of the vehicle while it is descending, you will not survive. 33 |
34 | If a group leader initiates the jump while you are not in the same vehicle, 35 | you will jump alongside the vehicle, 36 | but you have your own parachute which must be opened manually. 37 | ", f_var_mapClickTeleport_Height] 38 | ]]; 39 | -------------------------------------------------------------------------------- /f/nametag/include/f_nametagCacheLoop.sqf: -------------------------------------------------------------------------------- 1 | //==================================================================================== 2 | // 3 | // f_nametagCacheLoop.sqf - Checks near entities and processes them for tag data. 4 | // @ /u/Whalen207 | Whale #5963 5 | // 6 | //==================================================================================== 7 | 8 | //------------------------------------------------------------------------------------ 9 | // Initial setup. 10 | //------------------------------------------------------------------------------------ 11 | 12 | // Array that will hold all cache data. 13 | F_NT_CACHE = []; 14 | 15 | // Variable that will be used to keep track of Arma's day/night cycle. 16 | F_NT_VAR_NIGHT = 1; 17 | 18 | 19 | //------------------------------------------------------------------------------------ 20 | // Loops every second as long as the scheduler complies. 21 | //------------------------------------------------------------------------------------ 22 | 23 | // Check if CBA is present. 24 | if F_NT_MOD_CBA then 25 | { 26 | F_NT_CACHE_LOOP = 27 | [ 28 | { 29 | if F_NT_NAMETAGS_ON then 30 | { call f_fnc_nametagCache }; 31 | }, 32 | 0.5, 33 | [] 34 | ] call CBA_fnc_addPerFrameHandler; 35 | } 36 | else 37 | { 38 | F_NT_CACHE_LOOP = [] spawn 39 | { 40 | private _delay = 0.5; 41 | F_NT_CACHE_LOOP_RUN = true; 42 | 43 | // While the above variable is true, run the loop. 44 | while {F_NT_CACHE_LOOP_RUN} do 45 | { 46 | // ...Cache all nearby units and their data... 47 | if F_NT_NAMETAGS_ON then 48 | { call f_fnc_nametagCache }; 49 | 50 | // ...and then wait for the delay before doing it again. 51 | sleep _delay; 52 | }; 53 | }; 54 | }; 55 | -------------------------------------------------------------------------------- /f/dynamicViewDistance/f_setViewDistanceInit.sqf: -------------------------------------------------------------------------------- 1 | // FA3 - Dynamic View Distance 2 | // ==================================================================================== 3 | 4 | if (!hasInterface) exitWith {}; 5 | 6 | if (!isDedicated && (isNull player)) then 7 | { 8 | waitUntil {sleep 0.1; !isNull player}; 9 | }; 10 | 11 | //Set view distance in case the player starts in vehicle 12 | [player, objNull, vehicle player] spawn f_fnc_ehSetViewDistance; 13 | 14 | // Add event handlers: 15 | // Note: Using PlayerViewChanged instead of GetInMan and GetOutMan to cover UAVs as well. 16 | // Note: GetInMan is still needed due to a bug where PlayerViewChanged doesn't fire for 17 | // non-server players when they enter a vehicle they haven't entered before. 18 | // Because of this, when entering a vehicle the code is sometimes run twice. 19 | f_ehIndex_dynamicViewDistance_0 = addMissionEventHandler ['PlayerViewChanged', f_fnc_ehSetViewDistance]; 20 | f_ehIndex_dynamicViewDistance_1 = player addEventHandler ['SeatSwitchedMan', f_fnc_ehSetViewDistance]; 21 | f_ehIndex_dynamicViewDistance_2 = player addEventHandler ['GetInMan', f_fnc_ehSetViewDistance]; 22 | 23 | if (f_param_debugMode == 1) then 24 | { 25 | player sideChat format ["DEBUG (f\dynamicViewDistance\f_setViewDistanceInit.sqf): Added Event Handler PlayerViewChanged ID: %1", f_ehIndex_dynamicViewDistance_0]; 26 | player sideChat format ["DEBUG (f\dynamicViewDistance\f_setViewDistanceInit.sqf): Added Event Handler SeatSwitchedMan ID: %1", f_ehIndex_dynamicViewDistance_1]; 27 | player sideChat format ["DEBUG (f\dynamicViewDistance\f_setViewDistanceInit.sqf): Added Event Handler GetInMan ID: %1", f_ehIndex_dynamicViewDistance_2]; 28 | }; 29 | -------------------------------------------------------------------------------- /ws_fnc/AI/fn_setInsidePos.sqf: -------------------------------------------------------------------------------- 1 | /* ws_fnc_setInsidePos 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | 4 | FEATURE 5 | Positions an AI inside the building it's in. Unit will face windows (if possible) and go to kneel when on roof 6 | 7 | NOTE 8 | Nearest building is used, AI should be inside before calling the function 9 | 10 | USAGE 11 | Unit call ws_fnc_setInsidePos 12 | 13 | PARAMETERS 14 | 1. Unit | Mandatory 15 | 16 | RETURNS 17 | true 18 | */ 19 | 20 | private ["_u","_b","_udir","_inside","_facingwall","_dirtob","_dir","_nb"]; 21 | 22 | _u = _this; 23 | _nb = (nearestObjects [_u,["BagBunker_base_F","HouseBase"],50]); 24 | 25 | if (count _nb == 0) exitWith {}; 26 | 27 | _b = _nb select 0; 28 | 29 | _inside = [_u,0,0,25] call ws_fnc_isWallInDir; 30 | _facingwall = false; 31 | _dirtob = _u getRelDir _b; 32 | _udir = _dirtob - 180; 33 | 34 | // If unit is outside set to kneel and check for wall facing away from building 35 | if !(_inside) then { 36 | _u setUnitPos "Middle"; 37 | _facingwall = [_u,_udir] call ws_fnc_isWallInDir; 38 | } else { 39 | // Else if unit is inside set position to standing and check for wall from facing of unit 40 | _u setUnitPos "Up"; 41 | _facingwall = [_u,getDir _u] call ws_fnc_isWallInDir; 42 | }; 43 | 44 | if (_facingwall) then { 45 | 46 | // First check if there's a window nearby 47 | for "_x" from 0 to 360 step 5 do { 48 | _dir = _x; 49 | if !([_u,_dir] call ws_fnc_isWallInDir) exitWith {_udir = _dir;_facingwall = false}; 50 | }; 51 | 52 | // If still no good facing was good, simply set the unit to face inward 53 | if (_facingwall) then { 54 | _udir = _dirtob; 55 | }; 56 | }; 57 | 58 | _u doWatch ([_u, 20, _udir] call BIS_fnc_relPos); 59 | 60 | true 61 | -------------------------------------------------------------------------------- /f/nametag/include/f_nametagDisableKey.sqf: -------------------------------------------------------------------------------- 1 | //==================================================================================== 2 | // 3 | // f_nametagDisableKey.sqf - Sets up a key that can be used to flip the nametag 4 | // system on and off with a press. 5 | // 6 | // @ /u/Whalen207 | Whale #5963 7 | // 8 | //==================================================================================== 9 | 10 | //------------------------------------------------------------------------------------ 11 | // Setup the Action Key, default '='. 12 | //------------------------------------------------------------------------------------ 13 | 14 | // None of this will execute if the actionkey line in CONFIG is commented out. 15 | if (!isNil "F_NT_ACTIONKEY") then 16 | { 17 | F_NT_ACTIONKEY_KEYS = actionKeys F_NT_ACTIONKEY;// This key, a global variable. 18 | F_NT_ACTIONKEY_KEYNAMES = actionKeysNames F_NT_ACTIONKEY; // Which is named this... 19 | 20 | // Function that will determine when the disableKey is depressed. 21 | F_NT_KEYDOWN = 22 | { 23 | private _key = _this select 1; 24 | private _handled = false; 25 | if(_key in F_NT_ACTIONKEY_KEYS) then 26 | { 27 | F_NT_NAMETAGS_ON = !F_NT_NAMETAGS_ON; 28 | _handled = true; 29 | }; 30 | _handled; 31 | }; 32 | 33 | // Function that will determine when the disableKey is released. 34 | F_NT_KEYUP = 35 | { 36 | private _key = _this select 1; 37 | private _handled = false; 38 | if(_key in F_NT_ACTIONKEY_KEYS) then 39 | { 40 | _handled = true; 41 | }; 42 | _handled; 43 | }; 44 | 45 | // Add eventhandlers (functions above). 46 | (findDisplay 46) displayAddEventHandler ["keydown", "_this call F_NT_KEYDOWN"]; 47 | (findDisplay 46) displayAddEventHandler ["keyup", "_this call F_NT_KEYUP"]; 48 | }; 49 | -------------------------------------------------------------------------------- /ws_fnc/AI/fn_taskCrew.sqf: -------------------------------------------------------------------------------- 1 | /*WS_fnc_taskCrew 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | /* 4 | FEATURE 5 | Send a group of units to man empty statics and gunner-less vehicles in a given radius 6 | 7 | USAGE 8 | [group, radius] call ws_fnc_taskCrew 9 | 10 | RETURNS 11 | Array of units that didn't take a gunner seat 12 | */ 13 | 14 | private ["_pos","_vehicles","_staticarray","_units2","_locked","_units","_unit"]; 15 | 16 | params [ 17 | ["_group", grpNull, [grpNull]], 18 | ["_radius", 0, [0]] 19 | ]; 20 | 21 | _pos = (_group) call ws_fnc_getEPos; 22 | 23 | //Get nearby vehicles to start populating the static weapons 24 | _vehicles = []; 25 | { 26 | _vehicles append nearestObjects [_pos,[_x],_radius]; 27 | } forEach ["StaticWeapon","Tank","Car"]; 28 | 29 | _staticarray = []; 30 | _units = units _group; 31 | _units2 = _units - [leader _group]; 32 | 33 | //Create an array containing all vehicles in the area that are uncrewed and have a free gunner seat 34 | { 35 | //BI changed the value returned by locked in A3. See http://community.bistudio.com/wiki/locked 36 | _locked = false; 37 | if !(ws_game_a3) then {_locked = locked _x} else {if (locked _x >= 2) then {_locked = true};}; 38 | 39 | if ((_x emptyPositions "gunner") > 0 && !(_locked) && ((count crew _x) == 0)) then 40 | { 41 | _staticarray pushBack _x; 42 | }; 43 | } forEach _vehicles; 44 | 45 | //Man the statics 46 | { 47 | // Make sure it doesn't have a gunner yet 48 | if (isNull (gunner _x) && isNUll (_x getVariable ["ws_StaticCrew",objNull])) then { 49 | _unit = selectRandom _units2; 50 | _unit assignasgunner _x; 51 | [_unit] ordergetin true; 52 | _units = _units - [_unit]; 53 | _units2 = _units2 - [_unit]; 54 | 55 | _x setVariable ["ws_StaticCrew",_unit,true]; 56 | }; 57 | } forEach _staticarray; 58 | 59 | _units 60 | -------------------------------------------------------------------------------- /f/safeStart/f_safeStartLoop.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Safe Start, Server Loop 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | //===================================================================================== 4 | 5 | // Run the loop only on the server 6 | if !(isServer) exitWith {}; 7 | 8 | // Redundant sleep to give everything a second to settle 9 | sleep 2; 10 | 11 | //Intervals for checking the timer and for sending notifications 12 | //_intervalCheck should be a small number to avoid a delay when the 13 | //safeStart is being ended using the briefing page. 14 | private _intervalCheck = 2; 15 | private _intervalNotification = _intervalCheck * 30; //Must be a multiple of _intervalCheck 16 | 17 | private _started = false; 18 | while {f_param_mission_timer > 0} do { 19 | 20 | // Broadcast remaining time to players 21 | // The _started flag makes sure it is shown at the beginning of the mission. 22 | if (!_started || f_param_mission_timer % _intervalNotification == 0) then { 23 | ["SafeStart",[format["Time Remaining: %1 min",(f_param_mission_timer / 60) toFixed 1]]] remoteExec ["bis_fnc_showNotification", 0]; 24 | _started = true; 25 | }; 26 | 27 | uisleep _intervalCheck; // Sleep _intervalCheck seconds 28 | 29 | // Reduce the mission timer by _intervalCheck seconds 30 | f_param_mission_timer = f_param_mission_timer - _intervalCheck; 31 | publicVariable "f_param_mission_timer"; 32 | }; 33 | 34 | //Once the mission timer has reached 0, disable the safeties 35 | if (f_param_mission_timer <= 0) then { 36 | // Broadcast message to players 37 | ["SafeStartMissionStarting",["Safe start ended!"]] remoteExec ["bis_fnc_showNotification", 0]; 38 | 39 | // Remotely execute script to disable safety for all selectable units 40 | [false] remoteExec ["f_fnc_safety", playableUnits + switchableUnits]; 41 | }; 42 | -------------------------------------------------------------------------------- /f/missionConditions/fn_SetWind.sqf: -------------------------------------------------------------------------------- 1 | // F3 - SetWind 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // DECLARE VARIABLES AND FUNCTIONS 6 | 7 | private ["_wind","_strength","_gusts","_waves"]; 8 | 9 | // ==================================================================================== 10 | 11 | // SET KEY VARIABLES 12 | // We interpret the values parsed to the script. If the function was called from the parameters those values are used. 13 | 14 | params [["_wind",4,[0]],["_transition",0,[0]]]; 15 | 16 | // Exit if we're not overriding 17 | if ( _wind == 4 ) exitWith {}; 18 | 19 | _strength = 0.01; // Base wind strength 20 | _gusts = 0.01; // How fast the wind can change 21 | _waves = 0; // Size of waves 22 | 23 | // ==================================================================================== 24 | 25 | // SELECT WIND VALUES 26 | // Using the value of _wind, new wind values are set. 27 | 28 | switch (_wind) do 29 | { 30 | //None 31 | case 0: 32 | { 33 | _strength = 0.01; 34 | _gusts = 0.01; 35 | _waves = 0; 36 | }; 37 | 38 | //Light 39 | case 1: 40 | { 41 | _strength = 0.25; 42 | _gusts = 0.25; 43 | _waves = 0.6; 44 | }; 45 | 46 | //Heavy 47 | case 2: 48 | { 49 | _strength = 0.75; 50 | _gusts = 0.75; 51 | _waves = 1; 52 | }; 53 | }; 54 | 55 | // ==================================================================================== 56 | 57 | // SET MISSION CONDITIONS 58 | // Use the new values to set the transition across the network 59 | 60 | 61 | _transition setWindStr _strength; 62 | _transition setWindForce _gusts; 63 | _transition setWaves _waves; 64 | 65 | // ==================================================================================== 66 | 67 | // RETURN WIND PARAMS 68 | _strength 69 | -------------------------------------------------------------------------------- /f/fcs/fn_fcsBriefing.sqf: -------------------------------------------------------------------------------- 1 | // F3 - FCS Component Briefing Generator 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | /* 4 | This function generates a briefing tab describing the operation of the F3 FCS. It is called from f_fnc_fcsInit, if the tab has not already been generated by a previous call. 5 | */ 6 | // ==================================================================================== 7 | 8 | if (!hasInterface) exitWith {}; // Exit if not a player. 9 | 10 | _fcs = player createDiaryRecord ["diary", ["F3 Enhanced FCS"," 11 |
12 | Some vehicles in this mission are fitted with enhanced fire control systems. This adds some extra functionality relating to gunnery and targeting. 13 |

14 | COMMANDER'S OVERRIDE 15 |
16 | The enhanced FCS allows the commander to automatically point the main gun at a target of their choosing. When the commander selects the Commander's Override from the action menu, the main gun will automatically traverse and elevate until it is pointing at the centre of the targeted object. 17 |
18 | The commander must be aiming directly at an object to activate the override. Open ground or sky won't work. There must also be a gunner present for the override to work. The override will engage for a maximum of 4 seconds before releasing control. 19 |

20 | FCS DAMAGE 21 |
22 | When the vehicle is struck by high-calibre weapons, there's a chance the FCS will suffer damage. If the FCS is damaged, the Commander's Override will be disabled, as well as the gun zeroing and auto-leading functions and all night vision equipment. 23 |
24 | The FCS can be repaired by a player with engineering training (for example, an F3 vehicle driver) when they are in the gunner's seat. 25 | "]]; 26 | 27 | // Set a variable so this won't be generated again by subsequent inits 28 | f_var_fcs_briefingDone = true; -------------------------------------------------------------------------------- /f/fcs/fn_fcsFailure.sqf: -------------------------------------------------------------------------------- 1 | // F3 - FCS/Commander's Override system 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // Originally from: https://github.com/NikkoJT/njt_fcs (integrated with permission) 4 | 5 | // This function is used in the Hit EH defined in fcs_init. It determines whether a given hit causes an FCS failure. 6 | 7 | params ["_target","_projectile","_isDirect"]; 8 | 9 | private _projectileClass = ""; 10 | private _warheadType = ""; 11 | private _randomNumber = 0; 12 | 13 | if (_target getVariable ["f_var_fcs_failure",false]) exitWith { 14 | // diag_log "FCS: target already has an FCS failure" 15 | }; 16 | 17 | // Determine whether the projectile is an anti-tank weapon 18 | _projectileClass = typeOf _projectile; 19 | if !(_projectileClass isKindOf ["Default",configFile >> "CfgAmmo"]) exitWith { 20 | //diag_log "FCS: hit by something other than a weapon" 21 | }; 22 | _warheadType = getText (configFile >> "CfgAmmo" >> _projectileClass >> "warheadName"); 23 | if !(_warheadType in ["AP","HEAT","TandemHEAT"]) exitWith { 24 | // diag_log "FCS: projectile not HEAT or AP" 25 | }; 26 | if !(_isDirect) exitWith { 27 | // diag_log "FCS: splash damage only" 28 | }; 29 | 30 | // 5% of qualifying hits should trigger this 31 | _randomNumber = floor (random 20); 32 | if !(_randomNumber == 10) exitWith { 33 | // diag_log "FCS: projectile not randomly selected" 34 | }; 35 | 36 | // Hit turns off the NV and TI and sets an appropriate variable on the vehicle. Hopefully later it will also turn off stabilisation (BI blocked) 37 | _target setVariable ["f_var_fcs_equipInfo",(equipmentDisabled _target),true]; 38 | _target setVariable ["f_var_fcs_failure",true,true]; 39 | _target disableNVGEquipment true; 40 | _target disableTIEquipment true; 41 | 42 | // Spawn ongoing stuff that affects the vehicle until repaired 43 | [_target] spawn f_fnc_fcsPersistentEffects; -------------------------------------------------------------------------------- /ws_fnc/config.hpp: -------------------------------------------------------------------------------- 1 | class WS 2 | { 3 | 4 | class debug 5 | { 6 | file = "ws_fnc\Dbg"; 7 | class debugText {}; 8 | class typeCheck {}; 9 | class clipboardCode {}; 10 | class copyPos {}; 11 | class countUnits {}; 12 | class debugTriggers {postInit = 1;}; 13 | }; 14 | class tools 15 | { 16 | file = "ws_fnc\tools"; 17 | class gameCheck {preInit=1;}; 18 | class collectMarkers {}; 19 | class collectObjects {}; 20 | class collectObjectsNum {}; 21 | class collectBuildings {}; 22 | class loadVehicle {}; 23 | class checkHC {}; 24 | class showFPS {}; 25 | class nearPlayer {}; 26 | class listPlayers {}; 27 | class setGVar {}; 28 | class isWallInDir {}; 29 | class getObjectClasses {}; 30 | }; 31 | class effects 32 | { 33 | file = "ws_fnc\effects"; 34 | class createTripflare {}; 35 | class createLightning {}; 36 | class createCAS {}; 37 | class createOrdnance {}; 38 | }; 39 | class misc 40 | { 41 | file = "ws_fnc\misc"; 42 | class switchLights {}; 43 | class attachLight {}; 44 | class attachChem {}; 45 | class attachIR {}; 46 | class broadcast {}; 47 | class showIntro {}; 48 | }; 49 | class getPos 50 | { 51 | file = "ws_fnc\getPos"; 52 | class getPos {}; 53 | class getBPos {}; 54 | class getEPos {}; 55 | class nearestRoadPos {}; 56 | class nearestLandPos {}; 57 | class getPosInArea {}; 58 | }; 59 | class AI 60 | { 61 | file = "ws_fnc\AI"; 62 | class createGroup {}; 63 | class createVehicle {}; 64 | class createGarrison {}; 65 | class betterVehicle {}; 66 | class enterBuilding {}; 67 | class taskDefend {}; 68 | class taskCrew {}; 69 | class taskAmbush {}; 70 | class taskArtilleryFire {}; 71 | class taskLand {}; 72 | class taskConvoy {}; 73 | class addWaypoint {}; 74 | class setAIMode {}; 75 | class setInsidePos {}; 76 | }; 77 | 78 | }; 79 | -------------------------------------------------------------------------------- /f/missionConditions/fn_SetFog.sqf: -------------------------------------------------------------------------------- 1 | // F3 - SetFog 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // DECLARE VARIABLES AND FUNCTIONS 6 | 7 | private ["_strength","_decay","_base"]; 8 | 9 | // ==================================================================================== 10 | 11 | // SET KEY VARIABLES 12 | // We interpret the values parsed to the script. If the function was called from the parameters those values are used. 13 | 14 | params [ 15 | ["_fog", 4, [0]], 16 | ["_transition", 0, [0]] 17 | ]; 18 | 19 | // Exit when using mission settings 20 | if ( _fog == 4 ) exitWith {}; 21 | 22 | 23 | _strength = 0; // Value for fog at base level 24 | _decay = 0; // Decay of fog density with altitude. If set to 0 fog strength is consistent throughout. 25 | _base = 0; // Base altitude of fog (in meters). Up until this height fog does *not* loose density. 26 | 27 | // ==================================================================================== 28 | 29 | // SELECT FOG VALUES 30 | // Using the value of _fog, new fog values are set. 31 | 32 | switch (_fog) do 33 | { 34 | //None 35 | case 0: 36 | { 37 | _strength = 0; 38 | _decay = 0; 39 | _base = 0; 40 | }; 41 | 42 | //Light 43 | case 1: 44 | { 45 | _strength = 0.2; 46 | _decay = 0; 47 | _base = 0; 48 | }; 49 | 50 | //Heavy 51 | case 2: 52 | { 53 | _strength = 0.4; 54 | _decay = 0; 55 | _base = 0; 56 | }; 57 | }; 58 | 59 | // ==================================================================================== 60 | 61 | // SET MISSION CONDITIONS 62 | // Use the new values to set the transition across the network 63 | 64 | _transition setFog [_strength,_decay,_base]; 65 | 66 | // ==================================================================================== 67 | 68 | // RETURN FOG PARAMS 69 | [_strength,_decay,_base] 70 | -------------------------------------------------------------------------------- /ws_fnc/misc/fn_switchLights.sqf: -------------------------------------------------------------------------------- 1 | // SwitchLights function 2 | // v1 (17.06.2013) 3 | // By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 4 | // 5 | // FEATURE 6 | // Flip on/off streetlights in a given area 7 | // 8 | // USAGE 9 | // [switch,center,radius] call ws_fnc_switchLights; 10 | // 11 | // PARAMETERS 12 | // 1. Switch can be "ON" or "OFF" | MANDATORY 13 | // 2. Center can be markername, object or positional array | MANDATORY 14 | // 3. Radius has to be number | MANDATORY 15 | // 16 | // EXAMPLES 17 | // ["OFF",church,1000] call ws_fnc_switchLights; - turn off all lights in 1k radius around the object named "church" 18 | // ["ON",player,20] call ws_fnc_switchLights; - turn on all lights in 20m radius around the player 19 | 20 | params [ 21 | ["_switch", "", [""]], 22 | ["_pos", objNull, ["", objNull, grpNull, locationNull, []]], 23 | ["_radius", 0, [0]] 24 | ]; 25 | 26 | _pos = _pos call ws_fnc_getEPos; 27 | 28 | 29 | if !(ws_game_a3) then { 30 | //ARMA 2 31 | { 32 | private _lamps = _pos nearObjects [_x, _radius]; 33 | sleep 0.1; 34 | {_x switchLight _switch} forEach _lamps; 35 | } forEach ["Land_PowLines_WoodL", "Land_PowLines_ConcL", "Land_lampa_ind_zebr", "Land_lampa_sidl_3", "Land_lampa_vysoka", "Land_lampa_ind", "Land_lampa_ind_b", "Land_lampa_sidl"]; 36 | } 37 | else { 38 | //ARMA 3 39 | { 40 | private _lamps = _pos nearObjects [_x, _radius]; 41 | sleep 0.1; 42 | { 43 | if (_switch == "OFF") then { 44 | _x setHit ["light_1_hitpoint", 0.97]; //off 45 | } else { 46 | _x setHit ["light_1_hitpoint", 0]; //on 47 | }; 48 | } forEach _lamps; 49 | } forEach ["Lamps_Base_F", "PowerLines_base_F", "Land_PowerPoleWooden_L_F", "Land_PowerPoleWooden_F", "Land_LampHarbour_F", "Land_LampShabby_F", "Land_PowerPoleWooden_L_F", "Land_PowerPoleWooden_small_F", "Land_LampDecor_F", "Land_LampHalogen_F", "Land_LampSolar_F", "Land_LampStreet_small_F", "Land_LampStreet_F", "Land_LampAirport_F"]; 50 | }; 51 | -------------------------------------------------------------------------------- /ws_fnc/Tools/fn_collectBuildings.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_collectBuildings 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | 4 | FEATURE 5 | Collects all useable buildings (have building positions) in given radius 6 | 7 | USAGE 8 | Minimal 9 | [center,radius] call ws_fnc_collectBuildings 10 | 11 | Full 12 | [center,radius,bool,bool] call ws_fnc_collectBuildings 13 | 14 | PARAMETERS 15 | 1. Center from where to check - can be marker, object, location | MANDATORY 16 | 2. Radius in which to check - number | MANDATORY 17 | 3. Flag whether to ignore buildings without building positions | OPTIONAL - default true 18 | 4. Flag whether to directly assign an array containing all building positions to the building | OPTIONAL - default false 19 | 20 | RETURNS 21 | Array of useable buildings 22 | */ 23 | 24 | private ["_buildings","_bp"]; 25 | 26 | params [ 27 | ["_pos", objNull, ["", objNull, grpNull, locationNull, []]], 28 | ["_radius", 0, [0]], 29 | ["_flag1", true, [true]], 30 | ["_flag2", false, [false]] 31 | ]; 32 | 33 | _pos = _pos call ws_fnc_getEPos; 34 | 35 | _buildings = []; 36 | 37 | //Fill buildings array with classes shared by both games 38 | { 39 | _buildings append nearestObjects [_pos,[_x],_radius]; 40 | } forEach ["Fortress", "House","House_Small"]; 41 | 42 | //Add buildings specific to the game version 43 | if !(ws_game_a3) then { 44 | { 45 | _buildings append nearestObjects [_pos,[_x],_radius]; 46 | } forEach ["Church"]; 47 | } else 48 | 49 | { 50 | { 51 | _buildings append nearestObjects [_pos,[_x],_radius]; 52 | } forEach ["Ruins_F","BagBunker_base_F","Stall_base_F","Shelter_base_F"]; 53 | }; 54 | 55 | if (_flag1) then { 56 | { 57 | _bp = _x buildingPos 0; 58 | if (str _bp == "[0,0,0]" || !(_bp isEqualType [])) then {_buildings = _buildings - [_x]}; 59 | } forEach _buildings; 60 | }; 61 | 62 | if (_flag2) then { 63 | { 64 | [_x] call ws_fnc_getBPos; 65 | } forEach _buildings; 66 | }; 67 | 68 | 69 | _buildings 70 | -------------------------------------------------------------------------------- /ws_fnc/getPos/fn_getPosInArea.sqf: -------------------------------------------------------------------------------- 1 | /* ws_fnc_getPosInArea 2 | Latest: 11.10.2013 3 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 4 | Based on Moricky's BIS_fnc_randomPosTrigger 5 | 6 | USAGE 7 | [area] call ws_fnc_getPosInArea 8 | 9 | PARAMETERS 10 | 1. Either trigger or marker (rectangle/ellipse) 11 | 12 | FEATURE 13 | Return a random position within a marker or trigger area 14 | 15 | RETURNS 16 | positional array 17 | */ 18 | 19 | 20 | private ["_shape","_center","_pos","_px","_py","_vector","_dir"]; 21 | 22 | params[ 23 | ["_area", "", ["", objNull]] 24 | ]; 25 | 26 | _shape = ""; 27 | _center = []; 28 | _pos = [_area] call ws_fnc_getEPos; 29 | _dir = 360; 30 | 31 | switch (typeName _area) do { 32 | case "OBJECT": { _center = getPos _area;_area = triggerarea _area; _shape = _area select 3; _dir = _area select 2;}; 33 | case "STRING":{ _center = getMarkerPos _area; _shape = MarkerShape _area; _dir = markerDir _area;_area = markerSize _area;}; 34 | }; 35 | 36 | if (_shape isEqualType "") then { 37 | switch (_shape) do { 38 | case "RECTANGLE": {_shape = true;}; 39 | case "ELLIPSE": {_shape = false;}; 40 | default {_shape=true}; 41 | }; 42 | }; 43 | 44 | // Get random position 45 | 46 | _pX = _area select 0; 47 | _pY = _area select 1; 48 | 49 | _vector = if (_shape) then { 50 | 51 | //--- Rectangle 52 | [ 53 | (-_pX + 2 * random _pX), 54 | (-_pY + 2 * random _pY) 55 | ]; 56 | } else { 57 | 58 | //--- Ellipse 59 | private ["_ranDir"]; 60 | _ranDir = random 360; 61 | [ 62 | (cos _ranDir * random _pX), 63 | (sin _ranDir * random _pY) 64 | ]; 65 | }; 66 | 67 | // Rotate vector 68 | _vector = +_vector; 69 | _dir = -_dir; 70 | _pX = _vector select 0; 71 | _pY = _vector select 1; 72 | _vector set [0, (cos _dir)*_px - (sin _dir)*_py]; 73 | _vector set [1, (sin _dir)*_px + (cos _dir)*_py]; 74 | 75 | // Return new position 76 | _pos = [ 77 | (_center select 0) + (_vector select 0), 78 | (_center select 1) + (_vector select 1), 79 | 0 80 | ]; 81 | 82 | _pos 83 | -------------------------------------------------------------------------------- /f/cache/fn_cTracker.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Caching Script Tracker 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // DECLARE VARIABLES AND PARAMETERS 6 | private ["_groups","_debug","_exclude","_cached"]; 7 | 8 | params [ 9 | ["_range", 0, [0]] 10 | ]; 11 | 12 | _debug = if (f_param_debugMode == 1) then [{true},{false}]; 13 | 14 | // ==================================================================================== 15 | 16 | // BEGIN THE TRACKING LOOP 17 | while {f_var_cacheRun} do { 18 | _groups = allGroups select { ! isNull _x }; 19 | if (_debug) then{player globalchat format ["f_fnc_cache DBG: Tracking %1 groups",count _groups]}; 20 | { 21 | _exclude = _x getvariable ["f_cacheExcl",false]; 22 | _cached = _x getvariable ["f_cached", false]; 23 | 24 | if (!_exclude) then { 25 | if (_cached) then { 26 | 27 | if (_debug) then {player globalchat format ["f_fnc_cache DBG: Checking group: %1",_x]}; 28 | 29 | if ([leader _x, _range] call f_fnc_nearPlayer) then { 30 | 31 | if (_debug) then {player globalchat format ["f_fnc_cache DBG: Decaching: %1",_x]}; 32 | 33 | _x setvariable ["f_cached", false]; 34 | _x spawn f_fnc_gUncache; 35 | 36 | }; 37 | } else { 38 | if !([leader _x, _range * 1.1] call f_fnc_nearPlayer) then { 39 | 40 | if (_debug) then {player globalchat format ["f_fnc_cache DBG: Caching: %1",_x]}; 41 | 42 | _x setvariable ["f_cached", true]; 43 | [_x] spawn f_fnc_gCache; 44 | }; 45 | }; 46 | } else { 47 | if (_debug) then {player globalchat format ["f_fnc_cache DBG: Group is excluded: %1",_x]}; 48 | }; 49 | } foreach _groups; 50 | 51 | sleep f_var_cacheSleep; 52 | }; 53 | 54 | // If the caching loop is terminated, uncache all cached groups 55 | { 56 | if (_x getvariable ["f_cached", false]) then { 57 | _x spawn f_fnc_gUncache; 58 | _x setvariable ["f_cached", false]; 59 | }; 60 | } forEach allGroups; 61 | -------------------------------------------------------------------------------- /f/dynamicViewDistance/fn_ehSetViewDistance.sqf: -------------------------------------------------------------------------------- 1 | // FA3 - Dynamic View Distance 2 | // ==================================================================================== 3 | 4 | // Parameters 5 | // Note: _oldCameraOn, _newCameraOn, and _uav are only used for the PlayerViewChanged event. 6 | params [ 7 | ["_unit", player, [objNull]], 8 | ["_unit2_or_position", nil], 9 | ["_veh", vehicle player, [objNull]], 10 | ["_oldCameraOn", nil], 11 | ["_newCameraOn", nil], 12 | ["_uav", objNull, [objNull]] 13 | ]; 14 | 15 | private _vd = f_var_viewDistance_default; 16 | 17 | private _isInCargo = _unit in assignedCargo _veh; 18 | 19 | if (!(f_var_viewDistance_crewOnly && _isInCargo) && vehicle player != player) then 20 | { 21 | if (_veh isKindOf "Car") then {_vd = f_var_viewDistance_car;}; 22 | if (_veh isKindOf "Tank") then {_vd = f_var_viewDistance_tank;}; 23 | if (_veh isKindOf "Helicopter_Base_F") then {_vd = f_var_viewDistance_rotaryWing;}; 24 | if (_veh isKindOf "Plane") then {_vd = f_var_viewDistance_fixedWing;}; 25 | }; 26 | if (!(isNull _uav) && {unitIsUAV _uav }) then 27 | { 28 | //Note: Helicopter_Base_F includes quadcopters/hexacopters as well as the bigger Falcon 29 | if (_uav isKindof "Land") then {_vd = f_var_viewDistance_car;}; 30 | if (_uav isKindOf "Tank") then {_vd = f_var_viewDistance_tank;}; 31 | if (_uav isKindOf "Helicopter_Base_F") then {_vd = f_var_viewDistance_rotaryWing;}; 32 | if (_uav isKindOf "Plane") then {_vd = f_var_viewDistance_fixedWing;}; 33 | }; 34 | 35 | // if new viewDistance is different from the one in previous seat, change it, otherwise do nothing. 36 | if (_vd != viewDistance) then 37 | { 38 | setViewDistance _vd; 39 | 40 | if (f_param_debugMode == 1) then 41 | { 42 | player sideChat format ["DEBUG (f\dynamicViewDistance\fn_ehSetViewDistance.sqf): Viewdistance set to %1",_vd]; 43 | }; 44 | } 45 | else 46 | { 47 | if (f_param_debugMode == 1) then 48 | { 49 | player sideChat "DEBUG (f\dynamicViewDistance\fn_ehSetViewDistance.sqf): No Viewdistance change required"; 50 | }; 51 | }; 52 | -------------------------------------------------------------------------------- /f/setTeamColours/f_setTeamColours.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Buddy Team Colours 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | if (!hasInterface) exitWith {}; 6 | 7 | // MAKE SURE THE PLAYER INITIALIZES PROPERLY 8 | 9 | if (!isDedicated && (isNull player)) then 10 | { 11 | waitUntil {sleep 0.1; !isNull player}; 12 | }; 13 | 14 | // ==================================================================================== 15 | 16 | // SET CUSTOM VARIABLES 17 | // These variables govern the behaviour of the script 18 | 19 | // Colors will be set for groups of leaders with these suffixes 20 | private _leaders = ["_FTL"]; 21 | 22 | // Set suffixes for each color 23 | private _colors = [ 24 | ["MAIN", [] ], 25 | ["RED", ["_AT","_R1","_R2","_CLS"] ], 26 | ["BLUE", ["_AR1","_AR2","_FTL"] ], 27 | ["YELLOW", [] ], 28 | ["GREEN", [] ] 29 | ]; 30 | 31 | // ==================================================================================== 32 | 33 | // WAIT UNTIL 10 SECONDS AFTER INITIALIZING 34 | 35 | sleep 10; 36 | 37 | private _isFireteam = false; 38 | 39 | // ==================================================================================== 40 | 41 | // CHECK GROUP SIZE 42 | // If the group isn't a full fireteam, leave teams as default. 43 | 44 | { 45 | if ((format["%1",(leader (group player))] find _x) != -1) exitWith {_isFireteam = true;} 46 | } forEach _leaders; 47 | 48 | if(!_isFireteam) exitWith {}; 49 | 50 | // Only run this for the group leader: 51 | if((((units group player) select {isPlayer _x}) #0) != player) exitWith {}; 52 | 53 | // ==================================================================================== 54 | 55 | // SET TEAM COLOURS 56 | { 57 | private _unit = _x; 58 | private _unitStr = str _unit; 59 | 60 | { 61 | _x params ["_color", "_suffixes"]; 62 | { 63 | if ((_unitStr find _x) != -1) then { 64 | _unit assignTeam _color; 65 | }; 66 | } forEach _suffixes; 67 | } forEach _colors; 68 | 69 | } forEach units (group player); 70 | -------------------------------------------------------------------------------- /ws_fnc/Dbg/fn_debugTriggers.sqf: -------------------------------------------------------------------------------- 1 | //WS_fnc_debugTriggers 2 | //Creates various triggers to be used ingame. Does not need to run twice 3 | 4 | private _debug = false; if !(isNil "ws_debug") then {_debug = ws_debug}; 5 | if !(_debug) exitWith {}; 6 | if !(isNil "ws_dbg_trg") exitWith {}; 7 | 8 | 9 | player allowDammage false; 10 | if (ws_game_a3) then {player addAction ["Start Camera","[] call bis_fnc_camera;",[],2,false,true,"","driver _target == _this"];} else {onMapSingleClick "player setPos _pos";}; 11 | 12 | //Radio triggers to assist with debugging 13 | 14 | //Count units 15 | ws_dbg_trg=createTrigger["EmptyDetector",[0,0,0]]; 16 | ws_dbg_trg setTriggerArea[0,0,0,false]; 17 | ws_dbg_trg setTriggerActivation["GOLF","PRESENT",true]; 18 | ws_dbg_trg setTriggerStatements["this", "call ws_fnc_countUnits", ""]; 19 | ws_dbg_trg setTriggerText "Count units"; 20 | 21 | //Copy player position 22 | ws_dbg_trg=createTrigger["EmptyDetector",[0,0,0]]; 23 | ws_dbg_trg setTriggerArea[0,0,0,false]; 24 | ws_dbg_trg setTriggerActivation["HOTEL","PRESENT",true]; 25 | ws_dbg_trg setTriggerStatements["this", "call ws_fnc_copyPos", ""]; 26 | ws_dbg_trg setTriggerText "Copy player position"; 27 | 28 | //Clipboard code 29 | ws_dbg_trg=createTrigger["EmptyDetector",[0,0,0]]; 30 | ws_dbg_trg setTriggerArea[0,0,0,false]; 31 | ws_dbg_trg setTriggerActivation["INDIA","PRESENT",true]; 32 | ws_dbg_trg setTriggerStatements["this", "call ws_fnc_clipboardcode", ""]; 33 | ws_dbg_trg setTriggerText "execute code from clipboard"; 34 | 35 | //Recompile 36 | ws_dbg_trg=createTrigger["EmptyDetector",[0,0,0]]; 37 | ws_dbg_trg setTriggerArea[0,0,0,false]; 38 | ws_dbg_trg setTriggerActivation["JULIET","PRESENT",true]; 39 | if !(ws_game_a3) then { 40 | ws_dbg_trg setTriggerStatements["this", "ws_fnc_compiled = false;ws_fnc_compiled = false;publicVariable ""ws_fnc_compiled"";nul = [] execVM ""ws_fnc\ws_fnc_init.sqf"";", ""]; 41 | } else { 42 | ws_dbg_trg setTriggerStatements["this", "ws_fnc_compiled = false;publicVariable ""ws_fnc_compiled"";[] call BIS_fnc_Recompile;", ""]; 43 | }; 44 | ws_dbg_trg setTriggerText "recompile all ws_fnc"; 45 | -------------------------------------------------------------------------------- /f/nametag/include/f_nametagInitTalking.sqf: -------------------------------------------------------------------------------- 1 | //==================================================================================== 2 | // 3 | // f_nametagInitTalking.sqf - Places monitors on all players to check if they are 4 | // speaking. 5 | // 6 | // Adapted from code by Killzone Kid, and from ACE3 code. 7 | // - http://killzonekid.com/arma-scripting-tutorials-whos-talking/ 8 | // - https://github.com/acemod/ACE3 9 | // 10 | // Code previously from CSE. Credit to commy2. 11 | // 12 | // @ /u/Whalen207 | Whale #5963 13 | // 14 | //==================================================================================== 15 | 16 | //------------------------------------------------------------------------------------ 17 | // CBA version, if CBA is present. 18 | //------------------------------------------------------------------------------------ 19 | 20 | if F_NT_MOD_CBA then 21 | { 22 | [{ 23 | // Change setting only if new isn't equal to old. 24 | private _old = player getVariable ["wh_nt_isSpeaking", false]; 25 | private _new = (!(isNull findDisplay 55)); 26 | 27 | // Broadcast variable across server. 28 | if (!(_old isEqualTo _new)) then 29 | { player setVariable ["wh_nt_isSpeaking", _new, true] }; 30 | } , 0.25, []] call CBA_fnc_addPerFrameHandler; 31 | } 32 | 33 | //------------------------------------------------------------------------------------ 34 | // Scheduled version, if CBA is not present. 35 | //------------------------------------------------------------------------------------ 36 | 37 | else 38 | { 39 | F_NT_TALKING_LOOP = [] spawn 40 | { 41 | private _delay = 0.25; 42 | F_NT_TALKING_LOOP_RUN = true; 43 | 44 | // While the above variable is true, run the loop. 45 | while {F_NT_TALKING_LOOP_RUN} do 46 | { 47 | // Change setting only if new isn't equal to old. 48 | private _old = player getVariable ["wh_nt_isSpeaking", false]; 49 | private _new = (!(isNull findDisplay 55)); 50 | 51 | // Broadcast variable across server. 52 | if (!(_old isEqualTo _new)) then 53 | { player setVariable ["wh_nt_isSpeaking", _new, true] }; 54 | 55 | // ...and then wait for the delay before doing it again. 56 | sleep _delay; 57 | }; 58 | }; 59 | }; 60 | -------------------------------------------------------------------------------- /ws_fnc/AI/fn_setAIMode.sqf: -------------------------------------------------------------------------------- 1 | /*ws_fnc_setAIMode 2 | By Wolfenswan [FA]: wolfenswanarps@gmail.com | folkarps.com 3 | 4 | FEATURE 5 | Set a group to desired behaviour and combatmode 6 | 7 | RETURNS 8 | group 9 | 10 | USAGE 11 | [group,behaviour,combatmode,formation,speed] call ws_fnc_setAIMode 12 | 13 | PARAMETERS 14 | 1. Group to be set 15 | 2. Combat mode, Behaviour, speed and/or formation to be set (all strings, order does not matter) 16 | 17 | EXAMPLES 18 | [Group1,"LINE"] call ws_fnc_setAIMode; 19 | [Group2,"COMBAT","ECH LEFT","RED"] call ws_fnc_setAIMode; 20 | 21 | Accepted Strings: 22 | "COLUMN" "STAG COLUMN" "WEDGE" "ECH LEFT" "ECH RIGHT" "VEE" "LINE" "FILE" "DIAMOND" 23 | 24 | "CARELESS" "SAFE" "AWARE" "COMBAT" "STEALTH". 25 | 26 | "BLUE" "GREEN" "WHITE" "YELLOW" "RED" 27 | 28 | "FULL" "NORMAL" "LIMITED" 29 | */ 30 | 31 | private _grp = param [0, grpNull, [grpNull, objNull]]; 32 | private _modes = _this - [_grp]; 33 | 34 | { 35 | switch (_x) do { 36 | 37 | //Behaviour 38 | case "CARELESS": {_grp setBehaviour _x;}; 39 | case "SAFE": {_grp setBehaviour _x;}; 40 | case "AWARE": {_grp setBehaviour _x;}; 41 | case "COMBAT": {_grp setBehaviour _x;}; 42 | case "STEALTH": {_grp setBehaviour _x;}; 43 | 44 | //CombatMode 45 | case "BLUE": {_grp setCombatMode _x;}; 46 | case "GREEN": {_grp setCombatMode _x;}; 47 | case "WHITE": {_grp setCombatMode _x;}; 48 | case "YELLOW": {_grp setCombatMode _x;}; 49 | case "RED": {_grp setCombatMode _x;}; 50 | 51 | //Formation 52 | case "COLUMN": {_grp setFormation _x;}; 53 | case "STAG COLUMN": {_grp setFormation _x;}; 54 | case "WEDGE": {_grp setFormation _x;}; 55 | case "ECH LEFT": {_grp setFormation _x;}; 56 | case "ECH RIGHT": {_grp setFormation _x;}; 57 | case "VEE": {_grp setFormation _x;}; 58 | case "LINE": {_grp setFormation _x;}; 59 | case "FILE": {_grp setFormation _x;}; 60 | case "DIAMOND": {_grp setFormation _x;}; 61 | 62 | //Speed 63 | case "LIMITED": {_grp setSpeedMode _x;}; 64 | case "NORMAL": {_grp setSpeedMode _x;}; 65 | case "FULL": {_grp setSpeedMode _x;}; 66 | 67 | default {["ws_fnc_setAIMode DBG:",_x,"is not a valid combatmode, behaviour or formation!"] call ws_fnc_debugText}; 68 | }; 69 | 70 | } forEach _modes; 71 | 72 | _grp 73 | -------------------------------------------------------------------------------- /f/FTMemberMarkers/fn_SetLocalFTMemberMarkers.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Fireteam Member Markers 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // Description: Launches the main part of the FireTeam Member markers. 4 | // Parameters 5 | // Nothing. 6 | // Returns: 7 | // Nothing. 8 | // Example: 9 | // [] call f_fnc_SetLocalFTMemberMarker; 10 | // 11 | // ==================================================================================== 12 | 13 | if (!hasInterface) exitWith {}; 14 | 15 | // MAKE SURE THE PLAYER INITIALIZES PROPERLY 16 | if (!isDedicated && (isNull player)) then 17 | { 18 | waitUntil {sleep 0.1; !isNull player}; 19 | }; 20 | 21 | // Don't run this for zeus and virtual spectators 22 | if (side player isEqualto sideLogic) exitWith {}; 23 | 24 | // ==================================================================================== 25 | 26 | // DEFINE HELPER-FUNCTION 27 | // Define a small function to get/set a unit's team color 28 | // This function updates the assignedTeam variable 29 | // if assignedTeam returns a new team(color). 30 | 31 | f_fnc_GetUpdatedTeamValue = 32 | { 33 | params["_unit"]; 34 | private _team = assignedTeam _unit; 35 | private _color = _unit getvariable ["assignedTeam","ColorWhite"]; 36 | //_team can be nil if the player is controlling another unit (uav, zeus). 37 | if(!isNil "_team") then 38 | { 39 | private _colorNew = [_team] call f_fnc_GetMarkerColor; 40 | if(_color != _colorNew) then 41 | { 42 | _unit setVariable ["assignedTeam",_colorNew]; 43 | _color = _colorNew; 44 | }; 45 | }; 46 | _color 47 | }; 48 | 49 | 50 | // ==================================================================================== 51 | 52 | // START DRAWING MARKERS 53 | // launch the subscript for drawing the marker for each unit. 54 | 55 | [] spawn { 56 | f_var_HandlerGroup = []; 57 | while{!isNull player} do 58 | { 59 | { 60 | // check if we already are drawing the FT marker and that _x is alive 61 | if(!(_x in f_var_HandlerGroup) && alive _x) then 62 | { 63 | [_x] execVM "f\FTMemberMarkers\f_localFTMemberMarker.sqf"; 64 | f_var_HandlerGroup pushBack _x; 65 | }; 66 | } forEach units (group player); 67 | sleep 5; 68 | }; 69 | }; 70 | -------------------------------------------------------------------------------- /f/disableThermals/fn_disableThermals.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Disable Thermals 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // DECLARE VARIABLES AND FUNCTIONS 6 | 7 | private ["_allowedList", "_allowedTypes", "_allowedUnits"]; 8 | 9 | // SET KEY VARIABLES 10 | // Using the arguments passed to the script, we first define some local variables. 11 | 12 | params [["_allowedList", [], [[]]]]; 13 | 14 | f_var_disableThermals_enabled = true; 15 | 16 | // INTERPRET RESTRICTED ARRAY 17 | // Loop through the array containing the allowed classes and units and split them into two 18 | 19 | _allowedTypes = []; 20 | _allowedUnits = []; 21 | { 22 | if (_x isEqualType "") then {_allowedTypes pushBack _x}; 23 | if (_x isEqualType objNull) then {_allowedUnits pushBack _x}; 24 | } forEach _allowedList; 25 | 26 | // PERFORM CHECKS 27 | // Check if any vehicle is one of the allowed vehicles or in the allowed types, if not, disable their thermals. 28 | if (isServer) then { 29 | { 30 | private _vehicleToCheck = _x; 31 | 32 | if (_vehicleToCheck in _allowedUnits || {{_vehicleToCheck isKindOf _x} count _allowedTypes > 0}) then { 33 | // This is an allowed vehicle, ignore it 34 | } else { 35 | _vehicleToCheck disableTIEquipment true; 36 | _vehicleToCheck setVariable ["f_var_TIDisabled",true,true]; 37 | } 38 | } foreach vehicles; 39 | }; 40 | 41 | // HANDLE ASSEMBLED VEHICLES 42 | // Create event handler to disable thermals on assembled vehicles (e.g. UAV) unless that type is allowed to have thermals 43 | 44 | // Need to export _allowedTypes so that the event handler can access it 45 | f_var_disableThermals_allowedTypes = _allowedTypes; 46 | 47 | if (hasinterface && isNil "f_eh_disableThermals") then { 48 | f_eh_disableThermals = player addEventHandler ["WeaponAssembled", { 49 | params ["", ["_assembled", objNull, [objNull]]]; 50 | 51 | if ({_assembled isKindOf _x} count f_var_disableThermals_allowedTypes == 0) then { 52 | _assembled disableTIEquipment true; 53 | _vehicleToCheck setVariable ["f_var_TIDisabled",true,true]; 54 | } 55 | }]; 56 | }; 57 | -------------------------------------------------------------------------------- /f/groupMarkers/fn_localGroupMarker.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Folk Group Markers 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // SET KEY VARIABLES 6 | // Using variables passed to the script instance, we will create some local variables: 7 | 8 | params [ 9 | ["_grpName", "", [""]], 10 | ["_mkrType", "b_hq", [""]], 11 | ["_mkrText", "", [""]], 12 | ["_mkrColor","ColorBlack", [""]] 13 | ]; 14 | 15 | private _grp = missionNamespace getVariable [_grpName,grpNull]; 16 | private _mkrName = format ["mkr_%1",_grpName]; 17 | 18 | // ==================================================================================== 19 | 20 | // WAIT FOR GROUP TO EXIST IN-MISSION 21 | 22 | //If the group does not exist in this mission file, then we can exit. 23 | if (isNull _grp) exitWith {}; 24 | 25 | // We wait for the group to have members before creating the marker. 26 | if (count units _grp == 0) then 27 | { 28 | waitUntil { sleep 5; _grp = missionNamespace getVariable [_grpName,grpNull]; count units _grp > 0 }; 29 | }; 30 | 31 | // ==================================================================================== 32 | 33 | // CREATE MARKER 34 | // Depending on the value of _mkrType a different type of marker is created. 35 | 36 | _mkrName = createMarkerLocal [_mkrName,[(getPos leader _grp select 0),(getPos leader _grp select 1)]]; 37 | _mkrName setMarkerShapeLocal "ICON"; 38 | _mkrName setMarkerTypeLocal _mkrType; 39 | _mkrName setMarkerColorLocal _mkrColor; 40 | _mkrName setMarkerSizeLocal [0.8, 0.8]; 41 | _mkrName setMarkerTextLocal _mkrText; 42 | 43 | // ==================================================================================== 44 | 45 | // UPDATE MARKER POSITION 46 | // As long as certain conditions are met (the group exists) the marker 47 | // position is updated periodically. This only happens locally - so as not to burden 48 | // the server. 49 | 50 | while {{!isNull _x} count units _grp > 0} do 51 | { 52 | _mkrName setMarkerPosLocal [(getPos leader _grp select 0),(getPos leader _grp select 1)]; 53 | sleep 6; 54 | }; 55 | 56 | 57 | // ==================================================================================== 58 | -------------------------------------------------------------------------------- /f/medical/f_clsEH.sqf: -------------------------------------------------------------------------------- 1 | // FA3 - Combat Life Saver Event Handler 2 | // This component adds an event handler for use with the Combat Life Saver assignGear class. Units with the f3_cls trait can provide full heals using FAKs. 3 | // Enable this component in init.sqf 4 | // For credits and more information see https://github.com/folkarps/F3/wiki 5 | 6 | // Make sure the player is initialised 7 | if (!isDedicated && (isNull player)) then 8 | { 9 | waitUntil {sleep 0.1; !isNull player}; 10 | }; 11 | 12 | // Make sure the player can be broadcast properly 13 | _unit = player; 14 | 15 | // Add the EH 16 | [_unit, ["HandleHeal", { 17 | _this spawn { 18 | params ["_injured", "_healer","_isMedic"]; 19 | 20 | 21 | 22 | // Check whether the person healing the player is a CLS 23 | if (_healer getUnitTrait "f3_cls") then { 24 | 25 | // DEBUG 26 | if (f_param_debugMode == 1) then 27 | { 28 | player sideChat format ["DEBUG (f_clsEH.sqf): %1 is CLS healing %2",(name _healer),(name _injured)]; 29 | }; 30 | 31 | // Wait until the standard heal has been applied, or a timeout happens 32 | _timeout = (time + 20); 33 | waitUntil {(damage _injured <= 0.2501) or (time > _timeout)}; 34 | 35 | // If it timed out, exit with nothing but a debug message 36 | if (time > _timeout) exitWith { 37 | if (f_param_debugMode == 1) then 38 | { 39 | player sideChat format ["DEBUG (f_clsEH.sqf): Heal on %1 timed out without completing",(name _injured)]; 40 | }; 41 | }; 42 | 43 | // If the heal was successful, make it a full heal 44 | _injured setDamage 0; 45 | 46 | // DEBUG 47 | if (f_param_debugMode == 1) then 48 | { 49 | player sideChat format ["DEBUG (f_clsEH.sqf): %1 healed to %2 damage",(name _injured),(damage _injured)]; 50 | }; 51 | }; 52 | }; 53 | // Upon initialising, the player broadcasts an instruction to all connected clients, including themselves, to add the EH on the broadcasting player. 54 | // This instruction is added to the JIP queue, so any player joining in progress automatically receives the instructions from all existing players - and then broadcasts their own instruction. 55 | }]] remoteExec ["addEventHandler",0,_unit]; 56 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_aaf.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // FACTION: AAF 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_fia.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // FACTION: FIA 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_ldf.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // FACTION: LDF 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_npr.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // FACTION: NPR 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_csat.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // FACTION: CSAT 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_ctrg.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // FACTION: CTRG 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_nato.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // FACTION: NATO 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_zeus.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // FACTION: ZEUS 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_3ifb.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // VIRTUAL FACTION: 3IFB 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_spetsnaz.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // FACTION: Spetsnaz 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_syndikat.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // FACTION: SYNDIKAT 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_civ.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // FACTIONS: CIVILIAN, IDAP 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/briefing/f_briefing_gendarmerie.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Briefing 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // FACTION: GENDARMERIE 6 | 7 | // ==================================================================================== 8 | 9 | // NOTES: ADMINISTRATION 10 | // The code below creates the administration sub-section of notes. 11 | 12 | _adm = player createDiaryRecord ["diary", ["Administration"," 13 |
14 | *** Insert information on administration and logistics here. *** 15 | "]]; 16 | 17 | // ==================================================================================== 18 | 19 | // NOTES: EXECUTION 20 | // The code below creates the execution sub-section of notes. 21 | 22 | _exe = player createDiaryRecord ["diary", ["Execution"," 23 |
24 | COMMANDER'S INTENT 25 |
26 | *** Insert very short summary of plan here. *** 27 |

28 | MOVEMENT PLAN 29 |
30 | *** Insert movement instructions here. *** 31 |

32 | FIRE SUPPORT PLAN 33 |
34 | *** Insert fire support instructions here. *** 35 |

36 | SPECIAL TASKS 37 |
38 | *** Insert instructions for specific units here. *** 39 | "]]; 40 | 41 | // ==================================================================================== 42 | 43 | // NOTES: MISSION 44 | // The code below creates the mission sub-section of notes. 45 | 46 | _mis = player createDiaryRecord ["diary", ["Mission"," 47 |
48 | *** Insert the mission here. *** 49 | "]]; 50 | 51 | // ==================================================================================== 52 | 53 | // NOTES: SITUATION 54 | // The code below creates the situation sub-section of notes. 55 | 56 | _sit = player createDiaryRecord ["diary", ["Situation"," 57 |
58 | *** Insert general information about the situation here.*** 59 |

60 | ENEMY FORCES 61 |
62 | *** Insert information about enemy forces here.*** 63 |

64 | FRIENDLY FORCES 65 |
66 | *** Insert information about friendly forces here.*** 67 | "]]; 68 | 69 | // ==================================================================================== 70 | -------------------------------------------------------------------------------- /f/zeus/fn_zeusAddAddons.sqf: -------------------------------------------------------------------------------- 1 | // F3 Zeus Support - Add Addons 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // DECLARE VARIABLES 6 | 7 | private ["_addons","_cfgPatches","_class"]; 8 | 9 | // ==================================================================================== 10 | 11 | // SERVER CHECK 12 | // Ensure this script only executes on the server: 13 | 14 | if !(isServer) exitWith {}; 15 | 16 | // ==================================================================================== 17 | 18 | // SET KEY VARIABLES 19 | // Using variables passed to the script instance, we will create some local variables: 20 | 21 | params [ 22 | ["_curator", objNull], 23 | ["_mode", true, ["",true,[]]] 24 | ]; 25 | 26 | // ==================================================================================== 27 | 28 | // RESOLVE CURATOR VARIABLE 29 | // If the passed unit is not in the list of all curators, check whether the curator is assigned to it 30 | 31 | if !(_curator in allCurators) then { 32 | _curator = getAssignedCuratorLogic _curator; 33 | }; 34 | 35 | // If curator is null or not the correct logic exit with an error message. 36 | if (isNull _curator || typeOf _curator != "ModuleCurator_F") exitWith { 37 | player GlobalChat format ["DEBUG (f\zeus\fn_zeusAddAddons.sqf): Could not resolve curator properly, is either null or not the correct type. IsNull = %1, _curator type : %2 (should be ModuleCurator_F)",isNull _curator,typeOf _curator]; 38 | }; 39 | 40 | // ==================================================================================== 41 | 42 | // Decide which addons to add based on passed mode 43 | _addons = [""]; 44 | 45 | switch (typeName _mode) do { 46 | case "ARRAY": {_addons = _mode}; 47 | case "STRING": {_addons = [_mode]}; 48 | case "BOOL": { 49 | if (_mode) then { 50 | // If the mode is passed as true, set up the curator module as if its Addons drop-down in the editor was set to "All addons (including unofficial)" 51 | _curator setVariable ["Addons",3,true]; 52 | } else { 53 | // If the mode is passed as false, set up the curator module as if its Addons drop-down in the editor was set to "No addons" 54 | _curator setVariable ["Addons",0,true]; 55 | }; 56 | }; 57 | }; 58 | 59 | // Enable addons to the curator 60 | _curator addcuratoraddons _addons; 61 | -------------------------------------------------------------------------------- /f/skulls/fn_gruntBirthdayParty.sqf: -------------------------------------------------------------------------------- 1 | // FA3 - Skulls module (Grunt Birthday Party) 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // This component creates a colourful celebration of a late unit's life. And death. 4 | // ==================================================================================== 5 | 6 | params ["_unit"]; 7 | 8 | // basic setup 9 | private _pos = getPosATL _unit; 10 | private _soundSource = "#particlesource" createVehicleLocal _pos; 11 | 12 | // create a particle source 13 | private _particleSource1 = "#particlesource" createVehicleLocal _pos; 14 | // attach it to the head of the victim 15 | _particleSource1 attachTo [_unit,[0,0,0],"Head",true]; 16 | // fancy particles! I don't remember how this works 17 | _particleSource1 setParticleClass "TestEmitterEffect"; 18 | _particleSource1 setParticleParams [["\A3\Data_f\cl_basic.p3d",16,7,48,1],"","Billboard",1,5,[0,0,0],[0,0,0.5],0,0.5,0.01,0.1,[0.1],[[1,0,0,1]],[1],0.01,1,"","","",0,false,0,[[0,0,0,0]]]; 19 | _particlesource1 setParticleRandom [0,[0,0,0],[0.1,0.1,0.1],0,0,[0,0,0,1],0,0.1,1,0]; 20 | _particleSource1 setDropInterval 0.01; 21 | 22 | private _particleSource2 = "#particlesource" createVehicleLocal _pos; 23 | _particleSource2 attachTo [_unit,[0,0,0],"Head",true]; 24 | _particleSource2 setParticleClass "TestEmitterEffect"; 25 | _particleSource2 setParticleParams [["\A3\Data_f\cl_basic.p3d",16,7,48,1],"","Billboard",1,5,[0,0,0],[0,0,0.5],0,0.5,0.01,0.1,[0.1],[[0,1,0,1]],[1],0.01,1,"","","",0,false,0,[[0,0,0,0]]]; 26 | _particlesource2 setParticleRandom [0,[0,0,0],[0,0,0],0,0,[1,0.954608,0,0],0,0,1,0]; 27 | _particleSource2 setDropInterval 0.01; 28 | 29 | private _particleSource3 = "#particlesource" createVehicleLocal _pos; 30 | _particleSource3 attachTo [_unit,[0,0,0],"Head",true]; 31 | _particleSource3 setParticleClass "TestEmitterEffect"; 32 | _particleSource3 setParticleParams [["\A3\Data_f\cl_basic.p3d",16,7,48,1],"","Billboard",1,5,[0,0,0],[0,0,0.5],0,0.5,0.01,0.1,[0.1],[[1,0.716538,0,1]],[1],0.01,1,"","","",0,false,0,[[0,0,0,0]]]; 33 | _particlesource3 setParticleRandom [0,[0,0,0],[0,0,0],0,0,[1,0.954608,0,0],0,0,1,0]; 34 | _particleSource3 setDropInterval 0.01; 35 | 36 | // yaaay! 37 | _soundSource say3D "f_gruntBirthdayParty"; 38 | 39 | sleep 0.75; 40 | deleteVehicle _particleSource1; 41 | deleteVehicle _particleSource2; 42 | deleteVehicle _particleSource3; 43 | 44 | sleep 2; 45 | deleteVehicle _soundSource; 46 | -------------------------------------------------------------------------------- /f/nametag/include/f_nametagBrief.sqf: -------------------------------------------------------------------------------- 1 | //==================================================================================== 2 | // 3 | // f_nametagBrief.sqf - Gives non-CBA players options in briefing to config nametags. 4 | // @ /u/Whalen207 | Whale #5963 5 | // 6 | //==================================================================================== 7 | 8 | //------------------------------------------------------------------------------------ 9 | // Construct a briefing depending on present settings. 10 | //------------------------------------------------------------------------------------ 11 | 12 | [] spawn 13 | { 14 | waitUntil {scriptDone f_script_briefing}; 15 | 16 | private _bstr = format ["FA NAMETAGS

Toggle name tags for friendly units by pressing %1.

Name tags are displayed when aiming at individual units up to and above %3m away, and constantly for all units within %2m.

Note that using CBA will disable this menu and replace it with an enchanced and expanded one under ADDON OPTIONS. Code contributed by Whale#5963. 17 | ",F_NT_ACTIONKEY_KEYNAMES, F_NT_DRAWDISTANCE_NEAR,F_NT_DRAWDISTANCE_CURSOR]; 18 | 19 | if !F_NT_MOD_CBA then 20 | { 21 | _bstr = _bstr + "

NEARBY TAGS? ( YES / NO ) 22 |
Should nametags be shown for all units nearby, rather than just those under cursor?"; 23 | 24 | _bstr = _bstr + "

SHOW GROUP? ( YES / NO ) 26 |
Display the unit's group on mouseover?"; 27 | 28 | _bstr = _bstr + "

FONT SIZE? ( SMALL / MEDIUM / LARGE )
Font size of nametag text."; 29 | 30 | }; 31 | 32 | // Add brief to map screen. 33 | player createDiaryRecord ["Diary", ["FA Nametags (Options)",_bstr]]; 34 | }; 35 | -------------------------------------------------------------------------------- /f/missionConditions/f_setMissionConditions.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Mission Conditions 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // SET CONDITIONS 6 | // Set the mission conditions (weather and time) according to params. 7 | 8 | // ONLY SET CONDITIONS ON THE SERVER 9 | if (isServer) then { 10 | private _weatherParams = [f_param_weather, f_param_fog == 4, f_param_wind == 4] call f_fnc_setWeather; 11 | if (isNil "_weatherParams") then { 12 | f_var_conditions_params = [date, overcast, rain, lightnings, waves, windStr, fogParams]; 13 | } else { 14 | f_var_conditions_params = [date] + _weatherParams; 15 | }; 16 | 17 | // Fix for date sometimes returning wrong minute 18 | f_var_conditions_params#0 set [3,floor (dayTime + (.5/60))]; 19 | f_var_conditions_params#0 set [4,floor ((dayTime%1)*60+.5)]; 20 | 21 | private _fogParams = [f_param_fog] call f_fnc_setFog; 22 | if (!isNil "_fogParams") then { 23 | f_var_conditions_params set [6,_fogParams]; 24 | }; 25 | 26 | private _windParams = [f_param_wind] call f_fnc_setWind; 27 | if (!isNil "_windParams") then { 28 | f_var_conditions_params set [5,_windParams]; 29 | }; 30 | 31 | private _dateParams = [f_param_timeOfDay,f_param_timeOfYear] call f_fnc_setTime; 32 | if (!isNil "_dateParams") then { 33 | f_var_conditions_params set [0,_dateParams]; 34 | }; 35 | 36 | // STORE CONDITIONS PARAMETERS 37 | // Store all starting mission condition parameters in a global variable for later reference 38 | // array format - [[year,month,day,hour,minute],overcast,rain,lightnings,waves,windStr,[fogStr,fogDecay,fogBase]] 39 | publicVariable "f_var_conditions_params"; 40 | }; 41 | 42 | // ==================================================================================== 43 | 44 | 45 | // RUN CONDITIONS BRIEFING AND COLD BREATH ON CLIENTS ONLY 46 | if (hasInterface) then { 47 | // Wait until server publishes the mission conditions 48 | waitUntil {!isNil "f_var_conditions_params"}; 49 | 50 | // GENERATE CONDITION NOTES 51 | // Adds a briefing entry that summarizes the mission conditions 52 | [] execVM "f\missionConditions\f_conditionNotes.sqf"; 53 | 54 | // Wait until the mission has started - ambient temperature takes a tick to update 55 | sleep 0.1; 56 | 57 | // COLD BREATH 58 | // Cold breath particle spawner for if it's snowing, or in low ambient temperatures 59 | if (rainParams select 15 || (ambientTemperature select 0) < 6) then { 60 | [] spawn f_fnc_coldBreath; 61 | }; 62 | }; 63 | -------------------------------------------------------------------------------- /f/setAISkill/fn_setAISkill.sqf: -------------------------------------------------------------------------------- 1 | // F3 - SetAISkill 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // SET KEY VARIABLES 6 | 7 | params [ 8 | ["_unit", objNull, [objNull]], 9 | ["_skillOverride", f_var_skillError, [0]] 10 | ]; 11 | 12 | // ==================================================================================== 13 | 14 | // FAULT CHECK 15 | // If f_setAISkill.sqf has not been run exit with an error message 16 | 17 | if ((isNil "f_var_skillSet") || (isNil "f_var_skillRandom")) exitWith {}; 18 | 19 | // ==================================================================================== 20 | 21 | // If the unit was already processed, exit the function 22 | if (_unit getVariable ["f_setAISkill",false]) exitWith {}; 23 | 24 | // ==================================================================================== 25 | 26 | // Set the skill to the relevant side's skill-level 27 | private _skill = switch (side _unit) do { 28 | case west: {f_var_skillBLU}; 29 | case blufor: {f_var_skillBLU}; 30 | case east: {f_var_skillOPF}; 31 | case opfor: {f_var_skillOPF}; 32 | case independent: {f_var_skillRES}; 33 | case resistance: {f_var_skillRES}; 34 | case civilian: {f_var_skillCIV}; 35 | default {f_var_skillError}; 36 | }; 37 | 38 | //Parameter override 39 | if (_skillOverride != f_var_skillError) then { 40 | _skill = _skillOverride; 41 | }; 42 | 43 | // ==================================================================================== 44 | 45 | // If the faction's skill level is not configured, exit and ignore the unit from now on 46 | if (_skill == f_var_skillError) exitWith { 47 | _unit setVariable ["f_setAISkill",true]; 48 | }; 49 | 50 | // ==================================================================================== 51 | 52 | // Populate _skillArray using the new skill. 53 | private _skillArray = f_var_skillSet apply {(_x * _skill) + random f_var_skillRandom - random f_var_skillRandom}; 54 | 55 | // ==================================================================================== 56 | 57 | // We loop through all skilltypes and set them for the individual unit 58 | { 59 | _unit setSkill [_x, _skillArray select _forEachIndex]; 60 | } forEach ['aimingAccuracy','aimingShake','aimingSpeed','spotDistance','spotTime','courage','reloadSpeed','commanding','general']; 61 | 62 | // Mark the unit as processed 63 | _unit setVariable ["f_setAISkill",true]; 64 | 65 | // Return true 66 | true 67 | -------------------------------------------------------------------------------- /f/mapClickTeleport/fn_mapClickTeleportParachute.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Mission Maker Teleport 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // If a vehicle is teleported, a parachute is attached at a given height. 6 | // If it's a player, a parachute is added as a backacpk. 7 | // After landing, the old backpack is restored. 8 | 9 | params [["_obj", objNull, [objNull]]]; 10 | 11 | private _heightOpenParachute = 200; 12 | 13 | if ( ! (_obj isKindOf "CAManBase") ) then { 14 | 15 | // Set the vehicle up-right to make sure it doesn't drift away too much 16 | _obj setVectorUp [0, 0, 1]; 17 | 18 | waitUntil { sleep 0.1; getPos _obj select 2 < _heightOpenParachute }; 19 | _obj engineOn false; 20 | 21 | //Set the vehicle captive to prevent AT units from shooting it down immediately 22 | _obj setCaptive true; 23 | 24 | // Create the parachute, and attach the vehicle. 25 | private _chute = createVehicle ["B_Parachute_02_F", getPos _obj, [], 0, "NONE"]; 26 | _chute setDir getDir _obj; 27 | _obj attachTo [_chute, [0, 0, 0.2]]; 28 | 29 | // Once near the ground, detach the parachute and gently place the vehicle on the ground 30 | waitUntil { sleep 0.1; getPos _obj select 2 < 1.5 || {isNull _chute || {! alive _chute}} }; 31 | _obj allowDamage false; 32 | detach _obj; 33 | _obj setVectorUp [0, 0, 1]; 34 | _obj setVelocity [0, 0, -1]; 35 | _obj setPos [getPos _obj select 0, getPos _obj select 1, 0.5]; 36 | _obj allowDamage true; 37 | 38 | // Disable captivity to make the vehicles a viable target again 39 | _obj setCaptive false; 40 | 41 | // Let the parachute fall down 42 | _chute setVelocity [0 - sin windDir * 5, 0 - cos windDir * 5, 0]; 43 | _chute disableCollisionWith _obj; 44 | 45 | // Wait before removing the parachute, to allow it to die naturally 46 | sleep 10; 47 | if (!isNull _chute) then { 48 | deleteVehicle _chute; 49 | }; 50 | 51 | } else { 52 | 53 | // Save the backpack and its items 54 | private _backpack = backpack _obj; 55 | private _backpackItems = backPackItems _obj; 56 | 57 | // Replace the backpack with a parachute 58 | removeBackpack _obj; 59 | _obj addBackpack "B_parachute"; 60 | 61 | // Once on the ground, remove the parachute 62 | // and re-add the backpack with all its content 63 | waitUntil {sleep 0.1; isTouchingGround _obj}; 64 | if (alive _obj) then { 65 | removeBackpack _obj; 66 | _obj addBackPack _backpack; 67 | { 68 | (unitbackpack _obj) addItemCargoGlobal [_x,1]; 69 | } forEach _backpackItems; 70 | }; 71 | 72 | }; 73 | -------------------------------------------------------------------------------- /f/mapClickTeleport/fn_mapClickTeleportSetPos.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Mission Maker Teleport 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | 4 | // ==================================================================================== 5 | 6 | // SET KEY VARIABLES 7 | 8 | params [ 9 | ["_obj", objNull, [objNull]], 10 | ["_pos", [0,0,0], [[]]], 11 | ["_height", 0, [0]] 12 | ]; 13 | 14 | // ==================================================================================== 15 | 16 | // LOCALITY CHECK 17 | // The component should not run anywhere else but where the unit is local by default 18 | // This check is a redundancy to ensure this 19 | 20 | if !(local _obj) exitWith {}; 21 | 22 | // ==================================================================================== 23 | 24 | // SET DISPERSION 25 | 26 | private _dispersion = 100; // The maximum dispersion for units when HALO jumping 27 | private _dispersionHeight = 15; //The maximum dispersion in height when HALO jumping 28 | if (_height == 0) then { 29 | _dispersion = 10; 30 | _dispersionHeight = 0; 31 | }; 32 | 33 | // ==================================================================================== 34 | 35 | // HANDLING VEHICLES 36 | 37 | if ( ! (_obj isKindOf "CAManBase") ) then { 38 | // Disable dispersion, so that the vehicle can be placed exactly where we want. 39 | // e.g. on roads, where no obstacles are in the way. 40 | _dispersion = 0; 41 | 42 | if (_height == 0) then { 43 | private _emptyPosition = (_pos findEmptyPosition [0, 150, typeOf _obj]); 44 | if (count _emptyPosition >= 2) then { 45 | _pos = _emptyPosition; 46 | } 47 | }; 48 | }; 49 | 50 | // ==================================================================================== 51 | 52 | // TELEPORT UNITS 53 | 54 | // Make sure the _pos array has 3 elements and set the height 55 | _pos set [2, _height]; 56 | 57 | _pos = _pos vectorAdd [random _dispersion - random _dispersion, random _dispersion - random _dispersion, random _dispersionHeight - random _dispersionHeight]; 58 | _obj setPos _pos; 59 | 60 | // Display a notification that the teleport is done 61 | // Note: crew on a man returns a single element array containing that man 62 | ["MapClickTeleport",[f_var_mapClickTeleport_textDone]] remoteExecCall ["BIS_fnc_showNotification", (crew _obj) select {isPlayer _x}]; 63 | 64 | // ==================================================================================== 65 | 66 | // HALO 67 | 68 | // If unit or vehicle is paradropping, a parachute is added 69 | if (_height > 0) then { 70 | [_obj] spawn f_fnc_mapClickTeleportParachute; 71 | }; 72 | -------------------------------------------------------------------------------- /f/FTMemberMarkers/f_localFTMemberMarker.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Fireteam Member Markers 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // DECLARE PRIVATE VARIABLES 6 | 7 | private ["_mkrName","_mkr","_mkrBorder","_pos","_mkrborderName","_dir"]; 8 | 9 | // ==================================================================================== 10 | 11 | // SET KEY VARIABLES 12 | // Using variables passed to the script instance, we will create some local variables: 13 | 14 | params [["_unit", objNull, [objNull]]]; 15 | 16 | _mkrName = Format ["mkr_%1",_unit]; 17 | _mkrborderName = Format ["mkrB_%1",_unit]; 18 | 19 | // ==================================================================================== 20 | 21 | // CREATE MARKERS 22 | 23 | // this marker is slightly bigger and abused in such a way to make it seem like the next maker has a border 24 | _pos = getposATL _unit; 25 | _mkrBorder = createMarkerLocal [_mkrborderName,_pos]; 26 | _mkrBorder setMarkerShapeLocal "ICON"; 27 | _mkrBorder setMarkerTypeLocal "MIL_TRIANGLE"; 28 | _mkrBorder setMarkerColorLocal "ColorBlack"; 29 | _mkrBorder setMarkerSizeLocal [0.60, 0.60]; 30 | _mkrBorder setMarkerDirLocal (direction _unit); 31 | 32 | // This marker is the real marker 33 | _mkr = createMarkerLocal [_mkrName,_pos]; 34 | _mkr setMarkerShapeLocal "ICON"; 35 | _mkr setMarkerTypeLocal "MIL_TRIANGLE"; 36 | _mkr setMarkerColorLocal (_unit getvariable ["assignedTeam","ColorWhite"]); 37 | _mkr setMarkerSizeLocal [0.45, 0.45]; 38 | _mkr setMarkerDirLocal (direction _unit); 39 | 40 | 41 | // ==================================================================================== 42 | 43 | // Run the loop that sets the marker position 44 | 45 | while{alive _unit && (_unit in f_var_HandlerGroup)} do 46 | { 47 | _pos = getposATL _unit; 48 | _dir = (direction _unit); 49 | if (alive _unit && {_unit in units group player}) then 50 | { 51 | _mkrBorder setMarkerPosLocal _pos; 52 | _mkrBorder setMarkerDirLocal _dir; 53 | _mkr setMarkerPosLocal _pos; 54 | _mkr setMarkerDirLocal _dir; 55 | // makes a call to the function defined in f_setLocalFTMemberMarkers.sqf 56 | // retreives the stored color from the unit. 57 | _mkr setMarkerColorLocal ([_unit] call f_fnc_GetUpdatedTeamValue); 58 | } else { 59 | f_var_HandlerGroup = f_var_HandlerGroup - [_unit]; 60 | }; 61 | sleep 3; 62 | 63 | }; 64 | 65 | // ==================================================================================== 66 | 67 | //He's dead Jim, let's clear up obsolete markers 68 | deleteMarkerLocal _mkrBorder; 69 | deleteMarkerLocal _mkr; 70 | -------------------------------------------------------------------------------- /f/medical/init.sqf: -------------------------------------------------------------------------------- 1 | // FA3 - Wounding System 2 | // Uses the standard Arma 3 revive system with a few modifications: 3 | // - Restores vanilla behaviour of FAKs and medkits 4 | // - Reviving no only heals a player as much as a FAK 5 | // - Removes the "Force Respawn" 6 | // - Downed players can be dragged 7 | 8 | // ==================================================================================== 9 | 10 | // Allow access to the standard Arma 3 revive system macros 11 | #include "\a3\functions_f_mp_mark\Revive\defines.inc" 12 | 13 | if (!hasInterface) exitWith {}; 14 | 15 | // Remove the HandleHeal event handler to restore vanilla behaviour of FAKs and medkits 16 | [] spawn { 17 | // Wait until the event handler has been set 18 | waitUntil {sleep 1; (player getVariable ["bis_revive_ehHandleHeal", -1]) != -1}; 19 | 20 | // Remove the event handler and unset the variable 21 | player removeEventHandler ["HandleHeal", player getVariable "bis_revive_ehHandleHeal"]; 22 | player setVariable ["bis_revive_ehHandleHeal", nil]; 23 | }; 24 | 25 | // Make revives only heal the player to the level of a AFK 26 | // More accurately, damage the player a little once they are revived 27 | [] spawn { 28 | while {true} do { 29 | // Wait until the player is downed and being revived 30 | waitUntil {sleep 1;IS_DISABLED(player) && {IS_BEING_REVIVED(player)}}; 31 | 32 | // Wait until the player has been revived 33 | // This is a busy wait to ensure the reset is being done as soon as the reset as possible 34 | waitUntil {IS_ACTIVE(player)}; 35 | 36 | // Put damage down to FAK levels 37 | player setDamage 0.25; 38 | }; 39 | }; 40 | 41 | // Remove the "Force Respawn" hold-action 42 | [] spawn { 43 | while {true} do { 44 | // Wait until the player is downed and being revived 45 | waitUntil {sleep 1; IS_DISABLED(player)}; 46 | 47 | // Wait until the "Force Respawn" hold-action has been defined 48 | // This is a busy wait to ensure the action is removed as soon as possible 49 | waitUntil {(player getVariable [VAR_ACTION_ID_RESPAWN,-1]) != -1}; 50 | 51 | // Remove the hold-action 52 | [player, (player getVariable [VAR_ACTION_ID_RESPAWN,-1])] call bis_fnc_holdActionRemove; 53 | 54 | // Reset 'forcing respawn' flags incase the player started the action before it was removed 55 | if (IS_FORCING_RESPAWN(player)) then { 56 | SET_FORCING_RESPAWN(player, false); 57 | }; 58 | 59 | // Wait until the player's state changes 60 | private _prevState = GET_STATE(player); 61 | waitUntil{sleep 1; GET_STATE(player) != _prevState}; 62 | }; 63 | }; 64 | 65 | // Make downed players draggable 66 | [player] remoteExec ["f_fnc_addDragAction", 0, player]; 67 | -------------------------------------------------------------------------------- /f/nametag/functions/fn_nametagCache.sqf: -------------------------------------------------------------------------------- 1 | //==================================================================================== 2 | // 3 | // fn_nametagCache.sqf - Updates global cache of near entities and their data. 4 | // Updates some other stuff, too. 5 | // 6 | // > call f_fnc_nametagCache; < 7 | // @ /u/Whalen207 | Whale #5963 8 | // 9 | //==================================================================================== 10 | 11 | //------------------------------------------------------------------------------------ 12 | // If the nametag system is on, check all the stuff we need to check! 13 | //------------------------------------------------------------------------------------ 14 | 15 | if F_NT_NAMETAGS_ON then 16 | { 17 | // Collect the current player. 18 | private _player = player; 19 | 20 | // Check the day night cycle... 21 | F_NT_VAR_NIGHT = if F_NT_NIGHT then 22 | { linearConversion [0, 1, sunOrMoon, 0.25+0.5*(currentVisionMode _player),1,true]; } 23 | else { 1 }; 24 | 25 | // Check the day night cycle... 26 | F_NT_VAR_NIGHT = if F_NT_NIGHT then 27 | { linearConversion [0, 1, sunOrMoon, 0.25+0.5*(currentVisionMode _player),1,true]; } 28 | else { 1 }; 29 | 30 | F_NT_VAR_VEHICLETPP = 31 | if (!(isNull objectParent _player) && {(cameraView isEqualTo "EXTERNAL")}) 32 | then { true } 33 | else { false }; 34 | 35 | 36 | //-------------------------------------------------------------------------------- 37 | // If not set to only draw the cursor, collect nearEntities. 38 | //-------------------------------------------------------------------------------- 39 | 40 | if !F_NT_DRAWCURSORONLY then 41 | { 42 | // Collect the player's group. 43 | private _playerGroup = group _player; 44 | 45 | // Get the position of the player's camera. 46 | private _cameraPositionAGL = positionCameraToWorld[0,0,0]; 47 | private _cameraPositionASL = AGLtoASL _cameraPositionAGL; 48 | 49 | // Collect all nearEntities of the types we want. 50 | private _entities = 51 | _player nearEntities [["CAManBase","LandVehicle","Helicopter","Plane","Ship_F"], 52 | ((F_NT_DRAWDISTANCE_NEAR+(F_NT_DRAWDISTANCE_NEAR*0.25)+1)*F_NT_VAR_NIGHT)] 53 | select 54 | { 55 | !(_x isEqualTo _player) 56 | && (side group _x isEqualTo side group _player) 57 | && {!F_NT_VAR_VEHICLETPP || {(vehicle _x != vehicle _player)}} 58 | }; 59 | 60 | // Collect each filter entities' data. 61 | private _data = [_player,_playerGroup,_cameraPositionAGL,_cameraPositionASL,_entities,false] 62 | call f_fnc_nametagGetData; 63 | 64 | // Push all those names and their data to the global cache. 65 | F_NT_CACHE =+ _data; 66 | } 67 | else 68 | { F_NT_CACHE = [[],[]] }; 69 | }; 70 | -------------------------------------------------------------------------------- /f/medical/fn_onDrag.sqf: -------------------------------------------------------------------------------- 1 | #include "\a3\functions_f_mp_mark\Revive\defines.inc" 2 | 3 | params ["_unit", "_dragger"]; 4 | 5 | private _actionIdx = -1; //only relevant for dragger 6 | private _isDragger = local _dragger; 7 | 8 | if (f_param_debugMode == 1) then { 9 | diag_log format ["%2 drag on %1, being dragged by %2", _unit, _dragger, ["receiving", "activating"] select _isDragger]; 10 | }; 11 | 12 | if (_isDragger) then { 13 | // the dragger gets a release option. 14 | _actionIdx = _dragger addAction [format["Release %1",name _unit],{ 15 | params [ 16 | ["_target", objNull, [objNull]], 17 | ["_caller", objNull, [objNull]], 18 | ["_ID", -1, [0]], 19 | ["_arguments", nil] 20 | ]; 21 | _caller setVariable ["f_wound_dragging",nil,true]; 22 | }, nil, 6, false, true, "", "true"]; 23 | _dragger playMoveNow "AcinPknlMstpSnonWnonDnon"; 24 | } else { 25 | _unit attachTo [_dragger, [0, 1.1, 0.092]]; 26 | _unit setDir 180; 27 | _unit setPos getPos _unit; 28 | }; 29 | //setting these here to prevent race cconditions 30 | //although there will be a race condition between the 2 different execs, if the waitUntil 31 | //on the target finishes before we reach here (at the dragger), which really should never happen. 32 | _dragger setVariable ["f_wound_dragging", _unit, false]; 33 | _unit setVariable ["f_wound_being_dragged", true, false]; 34 | 35 | // Wait until the unit is released, dead, downed, or revived) 36 | private _dragged_unit = nil; 37 | waitUntil { 38 | sleep 0.1; 39 | _dragged_unit = _dragger getVariable ["f_wound_dragging",nil]; 40 | ( 41 | isNil "_dragged_unit" //unit is released 42 | || !(_unit getVariable ["f_wound_being_dragged", false]) 43 | || GET_STATE(_unit) != STATE_INCAPACITATED // unit isn't incapacitated anymore 44 | || GET_STATE(_dragger) == STATE_INCAPACITATED // dragger is incapacitated 45 | || IS_BEING_REVIVED(_unit) // someone else is reviving the unit 46 | || !alive _unit 47 | || !alive _dragger 48 | || !(isPlayer _dragger) 49 | || !(isPlayer _unit) 50 | || (vehicle _dragger != _dragger) 51 | ) 52 | }; 53 | 54 | if (_isDragger) then { 55 | detach _unit; 56 | }; 57 | 58 | _dragger setVariable ["f_wound_dragging", nil, true]; 59 | _unit setVariable ["f_wound_being_dragged", false, true]; 60 | 61 | if (f_param_debugMode == 1) then { 62 | diag_log format ["releasing unit on %1", ["target", "dragger"] select _isDragger]; 63 | }; 64 | 65 | if (_isDragger) then { 66 | if( GET_STATE(_dragger) == STATE_INCAPACITATED) then { 67 | _dragger switchMove ANIM_WOUNDED; 68 | } else { 69 | if(vehicle _dragger == _dragger) then { 70 | _dragger switchMove ""; 71 | } 72 | }; 73 | _dragger removeAction _actionIdx; 74 | }; 75 | -------------------------------------------------------------------------------- /ws_fnc/AI/fn_bettervehicle.sqf: -------------------------------------------------------------------------------- 1 | // better vehicle behaviour function 2 | // v1 13.04.2013 3 | // By Wolfenswan: wolfenswanarps@gmail.com 4 | // 5 | // FEATURE 6 | // Vehicle crews will only bail when the vehicle damage is over x (by default 0.8) or the guns are destroyed 7 | // 8 | // USAGE 9 | // [parameter1,parameter2] call ws_fnc_betterVehicle 10 | // 11 | // PARAMETERS 12 | // 1.side, object or array of objects | MANDATORY 13 | // 2. damage until the crew bails (any number from 0.1 to 1) | OPTIONAL - default is 0.8 14 | // 15 | // USAGE WITH F2: 16 | // Use f_var_vehicles or f_var_vehicles_BLU or f_var_vehicles_RES or f_var_vehicles_OPF as first parameter 17 | // 18 | // EXAMPLE 19 | // [east] call ws_fnc_betterVehicle - improves behaviour for all OPFOR vehicles 20 | 21 | if !(isServer) exitWith {}; 22 | 23 | private ["_debug","_vehicles","_handle","_unit"]; 24 | 25 | _debug = false; if !(isNil "ws_debug") then {_debug = ws_debug}; //Debug mode. If ws_debug is globally defined it overrides _debug 26 | 27 | params [ 28 | ["_side", sideUnknown, [sideUnknown,[],objNull]], 29 | ["_alloweddamage", 0.8, [0]] 30 | ]; 31 | 32 | _vehicles = []; 33 | 34 | ["ws_fnc_betterVehicle: ",[_side,typename _side],""] call ws_fnc_debugText; 35 | 36 | switch (typename _side) do { 37 | case "SIDE": { 38 | // All non-static vehicles with a turret on the map 39 | {if (!(_x isKindOf "StaticWeapon") && side _x == _side && canFire _x && (count crew _x > 0)) then [{ 40 | _vehicles pushBack _x;},{if _debug then {player sidechat format ["ws_bettervehicles DBG: %1 has no crew or is a static weapon",_x]};}]; 41 | } forEach vehicles; 42 | }; 43 | case "OBJECT": { 44 | _vehicles = [_side]; 45 | }; 46 | case "ARRAY": { 47 | _vehicles = _side; 48 | }; 49 | }; 50 | 51 | { 52 | _handle = _x getVariable "ws_better_vehicle"; 53 | if (isNil "_handle") then { 54 | if _debug then {player sidechat format ["ws_bettervehicles DBG: Improving: %1",_x]}; 55 | 56 | _unit = _x; 57 | _unit allowCrewInImmobile true; 58 | _unit setvariable ["ws_better_vehicle",_alloweddamage,true]; 59 | 60 | _unit addEventHandler ["Hit", { 61 | params ["_unit"]; 62 | private _damage = getDammage _unit; 63 | 64 | if (_damage > (_unit getVariable "ws_better_vehicle") || !(canFire _unit)) then { 65 | _unit allowCrewInImmobile false; 66 | {_x action ["eject", _unit];} forEach crew _unit; 67 | _unit removeEventHandler ["Hit",0]; 68 | if (ws_debug) then {player sidechat format ["ws_bettervehicles DBG: %1 has taken enough damage or can't fire any more. crew bailing",_unit]}; 69 | }; 70 | }]; 71 | 72 | }; 73 | } forEach _vehicles; 74 | 75 | if _debug then {player sidechat format ["ws_bettervehicles DBG: Exiting. Improved vehicles: %1",_vehicles]}; 76 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | MISSION README 2 | ============== 3 | 4 | Mission: [ Insert name of mission ] 5 | Version: [ Insert version here, format: N-N-N ] 6 | Developer(s): [ Insert your name(s) here. ] 7 | Description: [ Insert short mission description here ] 8 | 9 | 10 | 11 | README CONTENTS 12 | =============== 13 | 14 | 01. VERSION HISTORY 15 | 02. COPYRIGHT STATEMENT 16 | 03. TERMS OF USE 17 | 04. LEGAL DISCLAIMER 18 | 05. INSTALLATION 19 | 06. REQUIRED ADDONS 20 | 07. NOTES 21 | 08. CHANGE HISTORY 22 | 23 | 24 | 25 | 01. VERSION HISTORY 26 | =================== 27 | 28 | Version | Date | Notes 29 | 30 | [ Insert version, format: N-N-N ] | [ Insert date, format: DD MM CCYY ] | [ Insert short note here. ] 31 | 32 | 33 | 34 | 02. COPYRIGHT STATEMENT 35 | ======================= 36 | 37 | This mission is (c)[ CCYY ] [ Insert your name(s) here. ]. All rights reserved. 38 | 39 | 40 | 41 | 03. TERMS OF USE 42 | ================ 43 | 44 | This mission (hereafter 'Software') contains files to be used in the PC simulator ArmA 3. To use the Software you must agree to the following conditions of use: 45 | 46 | 1. [ Insert your name(s) here. ] (hereafter 'The Author(s)') grant to you a personal, non-exclusive license to use the Software. 47 | 48 | 2. The commercial exploitation of the Software without written permission from The Author(s) is expressly prohibited. 49 | 50 | 51 | 52 | 04. LEGAL DISCLAIMER 53 | ==================== 54 | 55 | The Software is distributed without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. The Software is not an official addon or tool. Use of the Software (in whole or in part) is entirely at your own risk. 56 | 57 | 58 | 59 | 05. INSTALLATION 60 | ================ 61 | 62 | To begin using the Software: 63 | 64 | 1. Move the file [ Insert name of your mission file here. ] into the following directory (assuming you have the Steam version of ArmA 3): 65 | 66 | C:\Program Files (x86)\Steam\steamapps\common\Arma 3\MPMissions 67 | 68 | 69 | 70 | 06. REQUIRED ADDONS 71 | =================== 72 | 73 | To play this mission the following addons are required: 74 | 75 | [ Insert name of addon ] - [URL for downloadable copy of the addon ] 76 | [ Insert name of addon ] - [URL for downloadable copy of the addon ] 77 | [ Insert name of addon ] - [URL for downloadable copy of the addon ] 78 | 79 | 80 | 07. NOTES 81 | ========= 82 | 83 | [ Insert your notes here. ] 84 | 85 | 86 | 87 | 08. CHANGE HISTORY 88 | ================== 89 | 90 | Version | Date 91 | 92 | [ Insert version, format: N-N-N ] | [ Insert date, format: DD MM CCYY ] 93 | [ Insert change #1 here. ] 94 | [ Insert change #2 here. ] -------------------------------------------------------------------------------- /f/authorisedCrew/fn_authorisedCrewCheck.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Authorised Crew Check 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // DECLARE VARIABLES AND FUNCTIONS 6 | 7 | private ["_warningMsg","_restrictedTypes","_restrictedUnits"]; 8 | 9 | // ==================================================================================== 10 | 11 | // SET KEY VARIABLES 12 | // Using the arguments passed to the script, we first define some local variables. 13 | 14 | params [ 15 | ["_fromEH", [], [[]]], 16 | ["_restrictedList", [], [[]]], 17 | ["_restrictcargo", false, [false]] 18 | ]; 19 | 20 | _fromEH params [ 21 | ["_vehicle", objNull, [objNull]], 22 | ["_vehicleRole", "", [""]], 23 | ["_unitToCheck", objNull, [objNull]] 24 | ]; 25 | 26 | _warningMsg = localize "STR_f_UnauthorisedCrew_Warning"; 27 | 28 | // DEBUG 29 | if (f_param_debugMode == 1) then 30 | { 31 | player sideChat format ["DEBUG (f\authorisedCrew\f_isAuthorisedCrew.sqf): _fromEH = %1",_fromEH]; 32 | player sideChat format ["DEBUG (f\authorisedCrew\f_isAuthorisedCrew.sqf): _vehicle = %1",_vehicle]; 33 | player sideChat format ["DEBUG (f\authorisedCrew\f_isAuthorisedCrew.sqf): _vehicleRole = %1",_vehicleRole]; 34 | player sideChat format ["DEBUG (f\authorisedCrew\f_isAuthorisedCrew.sqf): _unitToCheck = %1",_unitToCheck]; 35 | player sideChat format ["DEBUG (f\authorisedCrew\f_isAuthorisedCrew.sqf): _warningMsg = %1",_warningMsg]; 36 | }; 37 | 38 | // ==================================================================================== 39 | 40 | // PERFORM CHECKS I 41 | // We do not need to perform all of this script on all clients simulaneously, so if 42 | // the unit triggering the the event handler is local to another client or entering the vehicle in a cargo slot, we exit the 43 | // script. 44 | 45 | if !(local _unitToCheck) exitWith {}; 46 | if (_vehicleRole == "CARGO" && !_restrictcargo) exitWith {}; 47 | 48 | // ==================================================================================== 49 | 50 | // INTERPRET RESTRICTED ARRAY 51 | // Loop through the array containing the allowed classes and units and split them into two 52 | 53 | _restrictedTypes = _restrictedList select {_x isEqualType ""}; 54 | _restrictedUnits = _restrictedList select {_x isEqualType objNull}; 55 | 56 | // ==================================================================================== 57 | 58 | // PERFORM CHECKS II 59 | // Check if the unit is one of the allowed units or in the allowed types, if not, eject it from the vehicle. 60 | 61 | if (_unitToCheck in _restrictedUnits || ({_unitToCheck isKindOf _x} count _restrictedTypes == 1)) exitWith {}; 62 | 63 | ["UnauthorisedCrew",[_warningMsg]] call BIS_fnc_showNotification; 64 | _unitToCheck action ["getout",_vehicle]; 65 | -------------------------------------------------------------------------------- /f/zeus/fn_zeusAddObjects.sqf: -------------------------------------------------------------------------------- 1 | // F3 Zeus Support - Add Objects 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // DECLARE VARIABLES 6 | 7 | private ["_objects","_leaders"]; 8 | 9 | // ==================================================================================== 10 | 11 | // SERVER CHECK 12 | // Ensure this script only executes on the server: 13 | 14 | if !(isServer) exitWith {}; 15 | 16 | // ==================================================================================== 17 | 18 | // SET KEY VARIABLES 19 | // Using variables passed to the script instance, we will create some local variables: 20 | 21 | params [ 22 | ["_curator", objNull], 23 | ["_mode", [], [true,west,objNull,[]]], 24 | ["_groupLeaders", false, [true]] 25 | ]; 26 | 27 | // ==================================================================================== 28 | 29 | // RESOLVE CURATOR VARIABLE 30 | // If the passed unit is not in the list of all curators, check whether the curator is assigned to it 31 | 32 | if !(_curator in allCurators) then { 33 | _curator = getAssignedCuratorLogic _curator; 34 | }; 35 | 36 | // If curator is null or not the correct logic exit with an error message. 37 | if (isNull _curator || typeOf _curator != "ModuleCurator_F") exitWith { 38 | player GlobalChat format ["DEBUG (f\zeus\fn_zeusAddAddons.sqf): Could not resolve curator properly, is either null or not the correct type. IsNull = %1, _curator type : %2 (should be ModuleCurator_F)",isNull _curator,typeOf _curator]; 39 | }; 40 | 41 | // ==================================================================================== 42 | 43 | // Decide which objects to add based on passed mode 44 | 45 | _objects = []; 46 | switch (typeName _mode) do { 47 | case "ARRAY": {_objects = _mode}; 48 | case "OBJECT": {_objects = [_mode]}; 49 | case "SIDE": { 50 | {if (side _x == _mode && {!(vehicle _x in _objects)}) then {_objects pushback (vehicle _x)}} forEach allUnits; 51 | }; 52 | case "BOOL": { 53 | if (_mode) then { 54 | _objects = allMissionObjects ""; 55 | 56 | //To prevent unnecessary stress on the network compare the the new _objects array to the existing curator objects. If they are identical, reset _objects to an empty array 57 | if (_objects isEqualTo (curatorEditableObjects _curator)) then { 58 | _objects = []; 59 | }; 60 | 61 | } 62 | else { 63 | _curator removeCuratorEditableObjects [curatorEditableObjects _curator,true]; 64 | }; 65 | 66 | }; 67 | }; 68 | 69 | // Reduce list to group-leaders and empty vehicles if desired 70 | _leaders = []; 71 | if (_groupLeaders) then { 72 | { 73 | if ((isNull group _x) || _x == leader group _x) then { 74 | _leaders pushBack (vehicle _x); 75 | }; 76 | } forEach _objects; 77 | _objects = _leaders; 78 | }; 79 | 80 | // Add all selected objects to curator lists 81 | _curator addCuratorEditableObjects [_objects,true]; 82 | -------------------------------------------------------------------------------- /f/groupMarkers/fn_localSpecialistMarker.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Folk Unit Markers for Specialists 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // DECLARE PRIVATE VARIABLES 6 | 7 | private ["_mkr"]; 8 | 9 | // ==================================================================================== 10 | 11 | // SET KEY VARIABLES 12 | // Using variables passed to the script instance, we will create some local variables: 13 | 14 | params [ 15 | ["_untName", "", [""]], 16 | ["_mkrType", "b_hq", [""]], 17 | ["_mkrText", "", [""]], 18 | ["_mkrColor","ColorBlack", [""]] 19 | ]; 20 | 21 | private _mkrName = format ["mkr_%1",_untName]; 22 | private _unt = missionNamespace getVariable [_untName, objNull]; 23 | 24 | // ==================================================================================== 25 | 26 | // WAIT FOR UNIT TO EXIST IN-MISSION 27 | // We wait for the unit to exist before creating the marker. 28 | 29 | if (isNull _unt) then 30 | { 31 | waitUntil { sleep 3; _unt = missionNamespace getVariable [_untName, objNull]; !(isNull _unt) }; 32 | }; 33 | 34 | // ==================================================================================== 35 | 36 | // EXIT FOR DEAD UNITS (PART I) 37 | // If the unit is dead, this script exits. 38 | 39 | if (!alive _unt) exitWith {}; 40 | 41 | // ==================================================================================== 42 | 43 | // CREATE MARKER 44 | // Depending on the value of _mkrType a different type of marker is created. 45 | 46 | _mkr = createMarkerLocal [_mkrName,[(getPos _unt select 0),(getPos _unt select 1)]]; 47 | _mkr setMarkerShapeLocal "ICON"; 48 | _mkrName setMarkerTypeLocal _mkrType; 49 | _mkrName setMarkerColorLocal _mkrColor; 50 | _mkrName setMarkerSizeLocal [0.8, 0.8]; 51 | _mkrName setMarkerTextLocal _mkrText; 52 | 53 | // ==================================================================================== 54 | 55 | // UPDATE MARKER POSITION 56 | // As long as certain conditions are met (the unit is alive) the marker 57 | // position is updated periodically. This only happens locally - so as not to burden 58 | // the server. 59 | 60 | while {alive _unt} do 61 | { 62 | _mkrName setMarkerPosLocal [(getPos _unt select 0),(getPos _unt select 1)]; 63 | sleep 6; 64 | }; 65 | 66 | // ==================================================================================== 67 | 68 | // RESET MARKER FOR RESPAWNING UNITS 69 | // If respawn is enabled we need to reset the marker should the unit die 70 | 71 | // Sleep for the set respawn delay plus a small grace period 72 | sleep ((getNumber (missionconfigfile >> "RespawnDelay")) + 3); 73 | 74 | // Re-compile the unit variable using the initially passed string 75 | waitUntil { sleep 0.1; _unt = missionNamespace getVariable [_untName,objNull]; !(isNull _unt) }; 76 | 77 | // Check again if the unit is alive, if yes restart the marker function 78 | if (alive _unt) exitWith { 79 | [_untName, _mkrType, _mkrText, _mkrColor] spawn f_fnc_localSpecialistMarker; 80 | }; 81 | -------------------------------------------------------------------------------- /f/cache/fn_cInit.sqf: -------------------------------------------------------------------------------- 1 | // F3 - Caching Script Init 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // Check whether the paramater is defined (or caching switched off)) - if not, just exit 6 | if (isNil "f_param_caching" || {f_param_caching == 0}) exitWith {}; 7 | 8 | // ==================================================================================== 9 | 10 | // DECLARE VARIABLES AND FUNCTIONS 11 | private ["_range", "_str1"]; 12 | 13 | params [ 14 | ["_sleep", 0, [0]] 15 | ]; 16 | 17 | // ==================================================================================== 18 | 19 | // Wait for the mission to have launched before starting to cache. 20 | sleep 0.1; 21 | 22 | // Wait up to the desired time into the mission to give AI and players time to settle 23 | waitUntil {sleep 0.1; time > _sleep}; 24 | 25 | // ==================================================================================== 26 | 27 | // Player and the headless client's (if present) groups are always excluded from being cached 28 | if (!isDedicated && !(group player getVariable ["f_cacheExcl", false])) then { 29 | (group player) setVariable ["f_cacheExcl", true, true]; 30 | }; 31 | 32 | // ==================================================================================== 33 | 34 | // Rest of the Script is only run server-side 35 | if !(isServer) exitWith {}; 36 | 37 | // ==================================================================================== 38 | 39 | // Make sure script is only run once 40 | if (missionNameSpace getVariable ["f_cInit", false]) exitWith {}; 41 | f_cInit = true; 42 | 43 | // ==================================================================================== 44 | 45 | // All groups with playable units are set to be ignored as well 46 | { 47 | if ({_x in playableUnits} count units _x > 0) then {_x setVariable ["f_cacheExcl",true,true];}; 48 | } forEach allGroups; 49 | 50 | // Define parameters 51 | _range = f_param_caching; // The range outside of which to cache units 52 | f_var_cacheSleep = 6; // The time to sleep between checking 53 | f_var_cacheRun = true; 54 | 55 | [_range] spawn f_fnc_cTracker; 56 | 57 | // Start the debug tracker 58 | if (f_param_debugMode == 1) then { 59 | player globalchat format ["f_fnc_cInit DBG: Starting to track %1 groups, %2 range, %3 sleep",count allGroups,_range,f_var_cacheSleep]; 60 | 61 | [] spawn { 62 | 63 | // Giving the tracker a head start 64 | sleep (f_var_cacheSleep * 1.1); 65 | 66 | while {f_var_cacheRun} do { 67 | _str1 = "f_fnc_cache DBG:
" 68 | + format ["Total groups: %1
",count allGroups] 69 | + format ["Cached groups:%1
",{_x getvariable "f_cached"} count allGroups] 70 | + format ["Activated groups:%1
",{!(_x getvariable "f_cached")} count allGroups] 71 | + format ["Excluded groups:%1
",{(_x getvariable "f_cacheExcl")} count allGroups]; 72 | 73 | hintsilent parseText (_str1); 74 | diag_log (_str1); 75 | 76 | sleep f_var_cacheSleep; 77 | }; 78 | }; 79 | }; 80 | -------------------------------------------------------------------------------- /f/assignGear/f_assignGear_clothes.sqf: -------------------------------------------------------------------------------- 1 | // F3 - F3 Folk ARPS Assign Gear 2 | // Credits and documentation: https://github.com/folkarps/F3/wiki 3 | // ==================================================================================== 4 | 5 | // Prevent BIS Randomisation System 6 | // BIS created a system for randomisation unit loadouts, that may overwrite the changes made by this script, this will fix such system. 7 | 8 | _unit setVariable ["BIS_enableRandomization", false]; 9 | 10 | // ==================================================================================== 11 | 12 | // lets strip him down to the basic 13 | removeUniform _unit; 14 | removeHeadgear _unit; 15 | removeVest _unit; 16 | 17 | // Assign default clothes 18 | _uniform = _baseUniform; 19 | _helmet = _baseHelmet; 20 | _glasses = _baseGlasses; 21 | 22 | _rig = _standardRig; 23 | 24 | // Uncomment this block if you are adding an alternate loadout. See relevant block in description.ext for more info. 25 | // Select the default rig 26 | // _rig = switch (f_param_loadouts) do { 27 | // case 0:{_lightRig}; 28 | // case 1:{_standardRig}; 29 | // default{_standardRig}; 30 | // }; 31 | 32 | // Flip through unit to assign specialized uniforms 33 | 34 | // Pilot 35 | if (_typeOfUnit in _pilot) then { 36 | _helmet = _pilotHelmet; 37 | _uniform = _pilotUniform; 38 | _rig = _pilotRig; 39 | _glasses = _pilotGlasses; 40 | _nvg = _nvgPilot; 41 | }; 42 | 43 | // Jet Pilot 44 | if (_typeOfUnit in _jet) then { 45 | _helmet = _jetHelmet; 46 | _uniform = _jetUniform; 47 | _rig = _jetRig; 48 | _glasses = _jetGlasses; 49 | _nvg = ""; //Do not assign NVG, otherwise the jet helmet gets removed. 50 | }; 51 | 52 | // Crew 53 | if (_typeOfUnit in _crew) then { 54 | _helmet = _crewHelmet; 55 | _uniform = _crewUniform; 56 | _rig = _crewRig; 57 | _glasses = _crewGlasses; 58 | }; 59 | 60 | // Diver 61 | if (_typeOfUnit in _diver) then { 62 | _helmet = _diverHelmet; 63 | _uniform = _diverUniform; 64 | _rig = _diverRig; 65 | _glasses = _diverGlasses; 66 | }; 67 | 68 | // Ghillie 69 | if (_typeOfUnit in _ghillie) then { 70 | _helmet = _ghillieHelmet; 71 | _uniform = _ghillieUniform; 72 | _rig = _ghillieRig; 73 | _glasses = _ghillieGlasses; 74 | }; 75 | 76 | // Spec Op 77 | if (_typeOfUnit in _specOp) then { 78 | _helmet = _sfHelmet; 79 | _uniform = _sfUniform; 80 | _rig = _sfRig; 81 | _glasses = _sfGlasses; 82 | }; 83 | 84 | // VIP/Officer 85 | if (_typeOfUnit in _vip) then { 86 | _helmet = _vipHelmet; 87 | _uniform = _vipUniform; 88 | _rig = _vipRig; 89 | _glasses = _vipGlasses; 90 | }; 91 | 92 | // Add clothing items to unit 93 | if(count _uniform > 0) then 94 | { 95 | _unit forceAddUniform (selectRandom _uniform); 96 | }; 97 | 98 | if(count _helmet > 0) then 99 | { 100 | _unit addHeadgear (selectRandom _helmet); 101 | }; 102 | 103 | if(count _rig > 0) then 104 | { 105 | _unit addVest (selectRandom _rig); 106 | }; 107 | 108 | if(count _glasses > 0) then 109 | { 110 | removeGoggles _unit; 111 | _unit addGoggles (selectRandom _glasses); 112 | }; 113 | --------------------------------------------------------------------------------