Skip to content

Instantly share code, notes, and snippets.

View Heyoxe's full-sized avatar
💻
I may be slow to respond.

Heyoxe Heyoxe

💻
I may be slow to respond.
View GitHub Profile
@Heyoxe
Heyoxe / getArmaActions.sqf
Created April 28, 2020 13:47
Get all Arma Actions Keys.
_fnc_localizeKeyArray = {
params [
["_actions", [], []]
];
private _localized = [];
{
private _action = _x;
private _preLocalName = "";
{
private _char = _x;
@Heyoxe
Heyoxe / performances.sqf
Created April 24, 2020 15:06
Exec time of different methods
// 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 June 28, 2020 13:30
Arma 3 User Interfaces

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 February 16, 2020 00:44
Arma 3 - No-Recoil Detector
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;