Skip to content

Instantly share code, notes, and snippets.

@BaerMitUmlaut
BaerMitUmlaut / fps.sqf
Created October 14, 2018 21:38
In game live FPS graph with ropes
player setPos [15, 15, 0];
meme_history = [];
meme_indicators = [];
meme_ropes = [];
comment "x axis";
for "_i" from 0 to 9 do {
private _b = "Sign_Sphere100cm_F" createVehicle [0, 0, 0];
_b setPosATL [10, 10 + _i * 2, 0];
//PROOF OF CONCEPT
//Just put this in the initPlayerLocal.sqf, for MP you probably need to do some changes.
//Needs to be in scheduled environment - feel free to convert it to unscheduled.
_safeZones = [];
_dangerZones = [];
fncLightning = {
_pos = _this;
private ["_bolt", "_light", "_class", "_lightning", "_time"];
@BaerMitUmlaut
BaerMitUmlaut / MapOverlay.sqf
Created April 5, 2020 15:06
Overlays a picture over the whole map with the map still being usable
mission_fnc_mapOverlayCache = [] call CBA_fnc_createNamespace;
mission_fnc_mapOverlay = {
params ["_map"];
_map drawIcon [
getMissionPath "map.paa",
[1, 1, 1, 1],
[worldSize / 2, worldSize / 2, 0],
640 / ctrlMapScale _map,
640 / ctrlMapScale _map,
@BaerMitUmlaut
BaerMitUmlaut / ZeroGravity.sqf
Created May 24, 2019 08:30
Zero Gravity in Arma
private _vehicle = "B_MBT_01_cannon_F" createVehicle [0, 0, 0];
_vehicle setPosASL ((getPosASL player) vectorAdd [0, 10, 3]);
[{
params ["_args"];
_args params ["_vehicle", "_lastRun"];
private _delta = cba_missionTime - _lastRun;
private _force = [0, 0, getMass _vehicle * _delta * 9.8];
_vehicle addForce [_force, getCenterOfMass _vehicle];
@BaerMitUmlaut
BaerMitUmlaut / footprints.sqf
Created May 1, 2019 19:07
Permanent footprints
blue_footprints = [];
[{
private _footprints = player nearObjects ["#mark", 2];
{
private _p3d = (getModelInfo _x) select 1;
private _dir = direction _x;
private _pos = getPosASL _x;
_pos set [2, 0];
@BaerMitUmlaut
BaerMitUmlaut / initPlayerLocal.sqf
Created March 14, 2023 22:00
Global Mobilization T-55 IR Searchlight
addUserActionEventHandler ["headlights", "Activate", {
private _vehicle = vehicle ACE_player;
if !(_vehicle isKindOf "gm_t55_base" && { ACE_player == gunner _vehicle }) exitWith {};
private _light = _vehicle getVariable ["bb_irlight", objNull];
if (!isNull _light) then {
_vehicle animate ["mainturret_searchlight_cover_unhide", 1, true];
deleteVehicle _light;
} else {
_vehicle animate ["mainturret_searchlight_cover_unhide", 0, true];
#!/usr/bin/env python3
import re
import os
import fnmatch
def parse(filePath):
fileHandleInput = open(filePath, "r")
firstLine = fileHandleInput.readline().strip()
if firstLine == "/*":
# Username and e-mail for commits
git config --global user.name "<username>"
git config --global user.email <username>@users.noreply.github.com
# Preferred text editor for small stuff like commit messages, default is vim
# I'd recommend nano since it's easier to use but also runs in the terminal
git config --global core.editor <command>
# Always push current branch, create on remote if not existing yet
git config --global push.default current
numberMapping = [];
// 0 - 9 -> 0 - 9
for "_i" from 0 to 9 do {
numberMapping pushBack str _i;
};
// 10 - 24 -> 33 - 47
for "_i" from 33 to 47 do {
numberMapping pushBack (toString [_i]);
};
// 24 - 92 -> 58 - 126
gm_fc_BU
gm_fc_BU_bgs
gm_fc_BU_civ
gm_fc_CS
gm_fc_CS_bgs
gm_fc_CS_civ
gm_fc_GC
gm_fc_GC_bgs
gm_fc_GC_civ
gm_fc_HU