Skip to content

Instantly share code, notes, and snippets.

View indig0fox's full-sized avatar

Indigo indig0fox

View GitHub Profile
{
"rhsusf_M1117_base": {
"className": "rhsusf_M1117",
"displayName": "M1117 ASV",
"hierarchy": [
"rhsusf_M1117",
"rhsusf_M1117_base",
"Wheeled_Apc_F",
"Car_F",
"Car",
@indig0fox
indig0fox / ifx_windowBreak.sqf
Created February 17, 2022 22:32
Arma 3 - Break glass of building windows using ACE Interaction
/*
Author: IndigoFox
Contact: Indigo#6290 on Discord
Required Mods:
- CBA
- ACE3 (ace_interact_menu)
Description:
Players will see an ACE action on the windows of all buildings that will allow them to break the glass, bypassing the need to shoot them out.
@indig0fox
indig0fox / fn_logEvents.sqf
Last active November 16, 2021 18:53
Log server events
phx_fnc_systemTime = {
private _systemTimeFormat = ["%1-%2-%3T%4:%5:%6.%7Z"];
_systemTimeFormat append (systemTimeUTC apply {if (_x < 10) then {"0" + str _x} else {str _x}});
format _systemTimeFormat
};
phx_admin_fnc_logChat = {
params ["_channel","_text","_soldierName","_steamProfileName","_playerUID"];
private _path = "chatlog.json";
@indig0fox
indig0fox / assetInfoDiary.sqf
Last active May 20, 2021 09:35
Add details about assets in specific trigger zones to different Diary "subject categories".
{
player createDiarySubject ["BLUAssets","BLUFOR Assets"];
player createDiarySubject ["OPFAssets","OPFOR Assets"];
player createDiarySubject ["INDAssets","INDFOR Assets"];
_getVehicleData = {
params ["_vic", "_typeCount"];
@indig0fox
indig0fox / about.txt
Last active May 18, 2021 18:47
Tracking mine detonations
uses CBA function to add init code to the magazine that's placed, ACE_Explosives_Placed{classname} which gets the pos & execVMs a sideloaded script file
waits for magazine (placed, unarmed mine obj) to be objNull
checks for ammo obj in vicinity of magazine pos
if null, then mine was picked back up
if present, was armed and now an ammo obj exists as armed mine
gets info about armed mine, incl displayname of defaultMagazine property in config
waits for armed mine to be objNull
@indig0fox
indig0fox / fn_eh_fired.sqf
Created May 17, 2021 03:56
management of placed expl/mines and items thrown via ACE adv throwing or vanilla Throw action
// fired EH for non-bullets
// on any projectile that's not a bullet, draw a marker that tracks its position and persists 5 seconds after it 'dies'
// smoke grenades die when smoke stops coming out. frag grenades, explosives die after explosion.
{
_x addEventHandler["Fired", {
_this spawn {
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
@indig0fox
indig0fox / about.txt
Created May 15, 2021 03:43
FetchStaffInfo
script that uses the url_fetch x64 extension to poll (every 180 seconds) a PHP site with a query param of playerUID to return an array containing player name and staff role, which is then folded into a broadcast variable and used on clients for rendering 3d icons, measuring restrictions, etc.
@indig0fox
indig0fox / drawSafeStartIcons.sqf
Created May 12, 2021 03:13
Label staff, 'officer' class men, and assets during safe start. Incl ACE Spectator compat check that won't overdraw the ACE Spectator names/group icons.
{
staffIconHelper = [{
{
// skip if not safe start
if (!phx_safetyEnabled) exitWith {};
// skip if ACE spectator is drawing group/name icons so as not to clash
if (missionNamespace getVariable "ace_spectator_drawunits") exitWith {};
_staff = missionNamespace getVariable["staffInfo", nil];
@indig0fox
indig0fox / controls.hpp
Last active May 6, 2021 07:38
Arma 3 Asset Table: Opens a UI table that shows details about all vehicles within 500m of the player.
//description.ext or controls.hpp
#include "\a3\ui_f\hpp\defineCommon.inc"
#define CT_CONTROLS_TABLE 19
class TestDisplay
{
idd = -1;
class controls
{
class _CT_CONTROLSTABLE
@indig0fox
indig0fox / LCDConfigs.cs
Last active September 25, 2024 11:42
Space Engineers Automatic LCDs 2 Templates
// Reg Cockpit (Miner)
@0 AutoLCD
Center <Ores Aboard>
echo
InvListXS {T:*} +ore
@1 AutoLCD
Center <Energy Status>
PowerStored {T:Battery}