This is a very useful code sample to put in the init of an object. This is to activate a function. This is how to have an addaction only show up when you are close to an item.
_id = this addAction ["Teleport to FOB", {[player, [5309.6,10749.3,0]] call KER_fnc_teleport;}, "", 0, true, true, "", ""]; this setUserActionText [_id, "<t color='#00ff00'>Teleport to FOB.</t>"]; |
This is the function this addaction calls, this teleports a player to a certain location. In the addaction, it defines this location: [5309.6,10749.3,0], and this is where you will be teleported.
params ["_unit","_baseLoc"]; private _pos = [_baseLoc, 1, 10, 3, 0, 20, 0] call BIS_fnc_findSafePos; _unit setpos _pos; |
To disable the reload icon after firing a weapon in Arma 3, use this in the debug console, this will give you a clear screen to record a video without the HUD element popping up.
1 2 3 4 5 6 7 8 9 10 11 12 13 | showHUD [ true, // scriptedHUD true, // info true, // radar true, // compass true, // direction false, // menu true, // group false, // cursors true, // panels true, // kills false // showIcon3D ]; |
That would be very useful for making a video.