-
Content Count
3059 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by jshock
-
Trigger spawning respawn module
jshock replied to InfamousNova's topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://community.bistudio.com/wiki/BIS_fnc_addRespawnPosition https://community.bistudio.com/wiki/BIS_fnc_removeRespawnPosition -
Adding mods to pre-existing missions
jshock replied to tierdisogni1450's topic in ARMA 3 - MISSION EDITING & SCRIPTING
All you need to do is enable the mods that you want and then you can use them as you please in the editor...? Unless I'm not understanding exactly what you mean. -
Way to use BIS_fnc_dynamicText in this script without it lagging it out?
jshock replied to nebulazerz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You need to put a sleep in that while loop. -
Digging/burying animation?
jshock replied to bob_the_k's topic in ARMA 3 - MISSION EDITING & SCRIPTING
-
Digging/burying animation?
jshock replied to bob_the_k's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Go into the editor place a player unit, preview, hit ESC go to Animation Viewer, click, search to your heart's desire. -
Any videos or streams of people scripting something for Arma?
jshock replied to yacobmate's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Plenty of videos, I don't know about streamers though... -
Ummm...you posted the original like 2 and a half hours ago, this isn't an instant message forum, you actually have to give time for someone to respond....
-
Question: remoteExec and AddAction!
jshock replied to cdn_biggdogg's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You may want to create your own function that adds the action, but then use get/set variable on the client with a unique key so that you may then access the action ID inherently on each client whenever you need to. -
Why do people still use execVM? Instead of spawn?
jshock replied to MarkCode82's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The language used is sqf, so learn that, but if your're looking for more of a real world application C++/Java would be a good start as Arma does mirror concepts in sqf. However this is off topic from this thread, if you want to continue this discussion I recommend you PM someone or start your own discussion thread on the subject. -
Why do people still use execVM? Instead of spawn?
jshock replied to MarkCode82's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Most of the "lower level" tutorials out there use execVM because throwing people that have zero coding knowledge into function file structure, compilation, and optimization is just too complicated when a new coder just wants to create something as simple as a dynamic marker on an objective after it's completed. And since most people start on the lower levels, they don't learn about the use of call/spawn until later in their coding careers, so they use execVM instead, where they don't need to think about suspension or locality (as much anyways) or other topics that aren't so easily understood. -
Activate/Create task with trigger
jshock replied to HyperStorm's topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://www.youtube.com/watch?v=gRDBv3WLj6c -
Unit Weapon replacement script - Need help
jshock replied to flymaker's topic in ARMA 3 - MISSION EDITING & SCRIPTING
class Extended_PostInit_EventHandlers { class FLY_ChangeWeapons_Post_Init { init = "_handle = {[_x] execVM ""\FLY_ChangeWeapons\equip_change.sqf""} forEach allUnits;"; }; }; -
Finding nested array from value
jshock replied to ShadowRanger24's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_array = [ ["Key 1", [0, 0, 0], [0, 0, 0]], ["Key 2", [0, 0, 0], [0, 0, 0]], ["Key 3", [0, 0, 0], [0, 0, 0]] ]; _searchKey = "Key 1"; _matchedArray = []; { _keyArray = _x; if ((_keyArray select 0) == _searchKey) exitWith { { _matchedArray pushBack _x; } forEach _keyArray; }; } forEach _array; _matchedArray; Untested, but should work....but give you a concept. Forgot about the select command, use hallyGs post :D. -
Unit Weapon replacement script - Need help
jshock replied to flymaker's topic in ARMA 3 - MISSION EDITING & SCRIPTING
https://community.bistudio.com/wiki/magazinesAmmoFull -
Better way to check if a player is now wearing a new uniform?
jshock replied to nebulazerz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You need to remove all the actions that your fnc_bluSuitPowers adds add put a call to that above the _unit setVariable ["powers", false]; line. -
Better way to check if a player is now wearing a new uniform?
jshock replied to nebulazerz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Realized my stupid mistake (tired as hell atm), try this: if !(player getVariable ["bluSuitPowers_eh",false]) then { [ "checkEquippedUniform", "onEachFrame", { params ["_unit"]; if (uniform _unit isEqualTo "U_B_Soldier_VR") then { if ( !(_unit getVariable ["powers", false]) ) then { [ [], "fnc_bluSuitPowers", _unit ] call BIS_fnc_MP; }; _unit setVariable ["powers", true]; } else { _unit setVariable ["powers", false]; }; }, [player] ] call BIS_fnc_addStackedEventHandler; player setVariable ["bluSuitPowers_eh",true]; }; -
Better way to check if a player is now wearing a new uniform?
jshock replied to nebulazerz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That solution only works if the player picks it up and equips it, but the OP stated that is not always the case (implies that the uniform could be applied directly to the player via script). onEachFrame in this case shouldn't cause too much of a performance impact, unless you are adding a whole bunch of onEachFrame stacked event handlers, which is probably the issue here, so try the following, hopefully it works better, if it doesn't I'll need to see where you are actually using and putting the code. if !(player getVariable ["bluSuitPowers_eh",false]) then { [ "checkEquippedUniform", "onEachFrame", { params ["_unit"]; if (uniform _unit isEqualTo "U_B_Soldier_VR") then { [ [], "fnc_bluSuitPowers", _unit ] call BIS_fnc_MP; } else { //remove suit powers }; }, [player] ] call BIS_fnc_addStackedEventHandler; player setVariable ["bluSuitPowers_eh",true]; }; -
Better way to check if a player is now wearing a new uniform?
jshock replied to nebulazerz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
initPlayerLocal.sqf: [ "checkEquippedUniform", "onEachFrame", { if (uniform (_this select 0) isEqualTo "U_B_Soldier_VR") then { [ [], "fnc_bluSuitPowers", player ] call BIS_fnc_MP; }; }, [player] ] call BIS_fnc_addStackedEventHandler; -
How to change array to single class name for using to find parent class?
jshock replied to nebulazerz's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_myMag select 0 -
Random tasks\objectives
jshock replied to greywolf907's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I don't remember deleting it from my dropbox, but I guess I did somewhere down the line, however, greywolf's mission should be example enough: http://www.armaholic.com/page.php?id=28149 -
Create a player specific variable for each player in multiplayer
jshock replied to atmo's topic in ARMA 3 - MISSION EDITING & SCRIPTING
fn_createBagFence = { _newBag = "Land_BagFence_Short_F" createVehicle position player; _newBag attachto [player, [0, 1, 0.5]]; _newBag setVectorDirAndUp [ [1,0,0],[0,0,1] ]; detach _newBag; player setVariable ["playerBag",_newBag]; }; _bag = player getVariable ["playerBag",nil]; if (isNil "_bag") then { [] call fn_createBagFence; } else { deleteVehicle _bag; [] call fn_createBagFence; }; EDIT: Ninja'd :P -
is isServer , isDedicated or hasInterface still revelvent
jshock replied to MarkCode82's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sure, but it does essentially the same thing as handling it in the normal init.sqf, I prefer the event scripts that you've mentioned, but some people haven't moved over to those yet, it's a matter of personal preference (I'm not sure if there is any optimizations to using the event scripts over separate handles within the init.sqf or not).