Jump to content

jshock

Member
  • Content Count

    3059
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by jshock

  1. https://community.bistudio.com/wiki/BIS_fnc_addRespawnPosition https://community.bistudio.com/wiki/BIS_fnc_removeRespawnPosition
  2. 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.
  3. Go into the editor place a player unit, preview, hit ESC go to Animation Viewer, click, search to your heart's desire.
  4. Plenty of videos, I don't know about streamers though...
  5. jshock

    Need Help!

    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....
  6. 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.
  7. 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.
  8. 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.
  9. https://www.youtube.com/watch?v=gRDBv3WLj6c
  10. class Extended_PostInit_EventHandlers { class FLY_ChangeWeapons_Post_Init { init = "_handle = {[_x] execVM ""\FLY_ChangeWeapons\equip_change.sqf""} forEach allUnits;"; }; };
  11. jshock

    Finding nested array from value

    _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.
  12. https://community.bistudio.com/wiki/magazinesAmmoFull
  13. With the info you gave out yea, the action goes on the name of the solider you want the action to be applied to. You can put it in the init of that unit (change "fallenSoldier" to "this").
  14. fallenSoldier addAction [ "My Action", { hint "My action exectuted"; }, nil, 6, true, true, "", "_this distance _target < 3" ];
  15. 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.
  16. 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]; };
  17. 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]; };
  18. 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;
  19. jshock

    Random tasks\objectives

    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
  20. 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
  21. 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).
×