Skip to content

Instantly share code, notes, and snippets.

View Fusselwurm's full-sized avatar
🥸

Moritz Schmidt Fusselwurm

🥸
View GitHub Profile
@Fusselwurm
Fusselwurm / private-in-loops.sqf
Last active April 28, 2022 09:47
`private` is important to use in nested for loops
// not using private for `_i`
_x = "";
for [{_i = 1}, {_i <=2}, {_i = _i + 1}] do {
_x = _x + "o";
for [{_i = 1}, {_i <= 2}, {_i = _i + 1}] do {
_x = _x + "i";
};
};
20:19:00 Error in expression <turretPath = _this select 1;
if (count _turretPath > 1) then
{
_turretConfigPat>
20:19:00 Error position: <_turretPath > 1) then
{
_turretConfigPat>
20:19:00 Error Undefined variable in expression: _turretpath
20:19:00 File gm\gm_core\gm_core_vehicles\data\functions\gm_core_vehicles_fnc_turretPathToTurretConfigPath.sqf..., line 6
// für alle lösungen: vanilla stummschalten
class CfgWeapons {
class Default;
class CarHorn: Default {
drySound[] = {"",1,1};
};
};
@Fusselwurm
Fusselwurm / fix_honking_poc.sqf
Last active December 19, 2021 11:05
Fix vehicle honking: Proof of Concept
// mit **playSound3D**
// PROBLEM Sound bleibt an der generierten Stelle kleben
removeAllUserActionEventHandlers ["DefaultAction", "Activate"];
xxx_eh = addUserActionEventHandler ["DefaultAction", "Activate", {
xxx_honking_id = [
{
playSound3D [
"a3\sounds_f\weapons\horns\MRAP_02_horn_2.wss",
@Fusselwurm
Fusselwurm / gruppe-adler-concept-sbs.md
Last active September 21, 2021 19:30
Slotting Bounty System (SBS)

Slotting Bounty System (SBS)

Motivation

Some roles tend to stay open for a long time, some roles are taken the instant the slotting goes online. We want some system that equals the playing field and

  • incentivizes players to cover all roles
  • prevents slot sniping
  • gives everyone a chance to play their preferred role
@Fusselwurm
Fusselwurm / gist:6988b7fcf60b56633e3b2a0110af416a
Last active September 23, 2021 20:42
feedback baafest erster Abend

done:

  • grad_replay updaten, irgendwas is putt mit colors (grad_replay_intercept erwartet GRAD_REPLAY_COLORS global on server)
  • vermutl bug beim retaliationzivi erstellen, siehe serverlog (userInit.sqf#119, im ccreateUnit)

Bugs fixen:

  • prevent eigene KI AK nehmen oder eigene KI rausnehmen. und im BFT ordentlich benennen
  • respawn cars didnt work in first match. why?
  • prevent independent from following players to the city as long as not retaliating!!! am besten komplett static. evtl auch von anfang an feindl

grad-civs: population zones & transit traffic

step by step

enable grad-civs

addon settings: enable grad-civs

just for debugging purposes, choose to show civilians on map

@Fusselwurm
Fusselwurm / crash_sqflint.sqf
Last active June 20, 2020 18:52
this is a good way to crash sqflint in sqf/analyzer.py#361
#define X(var) var
X(X("foo"));
@Fusselwurm
Fusselwurm / rebase-loop.sh
Last active February 28, 2019 14:02
rebase loop for projects with high push frequency and rebase-always policy
#!/bin/bash
projectdir=$(realpath $1)
frequency=$2
if [[ $frequency == "" ]]; then $frequency=30; fi
if [[ ! -d $projectdir ]]; then echo "first param must be a directory"; exit 2; fi
if [[ ! -d $projectdir/.git ]]; then echo "not a git project"; exit 4; fi
[item-name]
sapling=Bäumchen
ammonium-nitrate=Stickstoffdünger
planter=Pflanzenbehälter
sapling-grow-bag=Anzuchtbeutel
[item-description]
sapling=Ein junger Baum
ammonium-nitrate=Läßt Bäume wachsen
sapling-grow-bag=Ein Anzuchtbeutel mit Bäumchen