commit d9646ef197384ee5d02ad50c7e3cbc8595799b2e Author: Tomas Date: Thu Nov 20 13:02:39 2025 +0100 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..82eef4d --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# ArmaSnips + +A collection of small scripts for making Arma 3 maps. + +Scripts need to be edited in order to work. For example in order for `highcommand.sqf` script +to work, you need to set `_commander` variable to the specific unit you want as commander. + +| Script | Description | +| --------------- | ----------------------------------------------------------- | +| highcommand.sqf | Assigns to `_commander` every unit that matches their side. | +| privatemark.sqf | Displays markers only to `_target` player. | \ No newline at end of file diff --git a/highcommand.sqf b/highcommand.sqf new file mode 100644 index 0000000..87b0525 --- /dev/null +++ b/highcommand.sqf @@ -0,0 +1,27 @@ +0 spawn { + // Replace `commander` with your unit variable + _commander = commander; + + waitUntil { + sleep 1; + + { + _units = + if (count (units _x select {alive _x}) != 0) then + { + _commander hcSetGroup [_x]; + } + } + forEach groups side _commander; + + { + if (count (units _x select {alive _x}) == 0) then + { + _commander hcRemoveGroup _x; + } + } + forEach hcAllGroups _commander; + + false; + }; +}; \ No newline at end of file diff --git a/privatemark.sqf b/privatemark.sqf new file mode 100644 index 0000000..1c4a3fe --- /dev/null +++ b/privatemark.sqf @@ -0,0 +1,23 @@ +this spawn { + // Who should see the marker? + _target = commando; + + // Marker settings + _label = "Resupply"; + _color = "ColorCIV"; + _marker = "hd_dot"; + + waitUntil + { + sleep 1; + !isNull player; + }; + + if (player == _target) then + { + _m = createMarkerLocal ["mark_" + (str position _this), position _this]; + _m setMarkerText _label; + _m setMarkerColor _color; + _m setMarkerType _marker; + }; +}; \ No newline at end of file