Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
I may be slow to respond.

Heyoxe Heyoxe

💻
I may be slow to respond.
View GitHub Profile
@Heyoxe
Heyoxe / getArmaActions.sqf
Created Apr 28, 2020
Get all Arma Actions Keys.
View getArmaActions.sqf
_fnc_localizeKeyArray = {
params [
["_actions", [], []]
];
private _localized = [];
{
private _action = _x;
private _preLocalName = "";
{
private _char = _x;
@Heyoxe
Heyoxe / performances.sqf
Created Apr 24, 2020
Exec time of different methods
View performances.sqf
// i7-7700k @ 5 gHz
// Asus GeForce GTX 1070 OC
// 16gb Ram 2888 mHz
// 0.0015
private _data = '29';
private _return = call {
if (_data isEqualTo 0) exitWith { "P" };
if (_data isEqualTo 1) exitWith { "O" };
if (_data isEqualTo 2) exitWith { "P" };
@Heyoxe
Heyoxe / readme.md
Last active Jun 28, 2020
Arma 3 User Interfaces
View readme.md

UI, GUI, UX, so many terms, I'm lost

UI stands for User Interface, something with which the user interacts with, including any physical elements (Mouse, Keyboard, etc.).

GUI stands for Graphical User Interface and is a subset of the above except that those are on screen and never physical (Buttons, Listboxes, etc.).

UX stands for User eXperience and is the thing you should care the most about in your GUIs. This is how the player interacts with your interface and how your interface affects the user.

Examples of UI Design

@Heyoxe
Heyoxe / norecoilDetector.sqf
Created Feb 16, 2020
Arma 3 - No-Recoil Detector
View norecoilDetector.sqf
player addEventHandler ["FiredMan", {
_this spawn {
params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle"];
if (!((stance _unit) in ["STAND", "CROUCH"]) || { isWeaponRested _unit } || { isWeaponDeployed _unit }) exitWith {};
private _onFireFrameVector = getCameraViewDirection _unit;
uiSleep (diag_deltaTime * 2);
private _onFireBufferedFrameVector = getCameraViewDirection _unit;
private _onFireVectorDeltaArray = (_onFireFrameVector vectorDiff _onFireBufferedFrameVector) apply { parseNumber ((abs _x) toFixed 5) };
private _onFireVectorDeltaAbsolute = 0;
{ _onFireVectorDeltaAbsolute = _onFireVectorDeltaAbsolute + _x } forEach _onFireVectorDeltaArray;