Jump to content

jshock

Member
  • Content Count

    3059
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by jshock

  1. jshock

    Healing script help

    For future reference, this thread would more properly belong here. But to answer your question: this addAction [ "Heal", { (_this select 0) setDamage 0; }, nil, 6, true, true, "", "damage _target > 0.1"] ;Should only present when the player has greater than 10% damage.
  2. In the redressInit.sqf: //Gear classes names go below! //----------------------------- JSHK_weaponArr = ["LMG_Zafir_F","arifle_Mk20_F"]; JSHK_uniformArr = ["U_IG_Guerilla3_1","U_IG_Guerilla3_2","U_IG_Guerilla1_1","U_IG_Guerilla2_1","U_IG_Guerilla2_2","U_IG_Guerilla2_3","U_IG_leader"]; JSHK_vestArr = ["V_BandollierB_khk", "Vest_V_BandollierB_rgr", "Vest_V_Chestrig_rgr"]; JSHK_headArr = ["H_Shemag_olive","H_ShemagOpen_khk","H_ShemagOpen_tan"]; JSHK_goggleArr = [""]; JSHK_backpackArr = ["B_FieldPack_cbr","B_OutdoorPack_tan"]; //********************************** JSHK_faceArr = ["classname","classname"];//<<<<<<<Add this line //----------------------------- And then in the fn_Redress.sqf after line 65: _face = JSHK_faceArr call BIS_fnc_selectRandom; And on line 81 add: _x setFace _face;
  3. Sorry Persian, literally just saw this today, must have missed the notification, anyhow, I currently don't have the system setup to handle factions directly (aside from the exclusion of certain factions). The variable you can use is: unit setVariable ["JSHK_doneRedress",true]; As far as vehicle textures and such, vehicles weren't the intent of this system, however, the framework provide should make it simple enough to extrapolate for use with vehicles. All you should have to do is execVM the redressInit.sqf for each side from within the init.sqf, basically a thread per side that you want redressed. _eastHandle = [EAST, true, true] execVM "JSHK_Redress\redressInit.sqf"; _westHandle = [WEST, true, true] execVM "JSHK_Redress\redressInit.sqf"; _civHandle = [CIVILIAN, true, true] execVM "JSHK_Redress\redressInit.sqf";
  4. Defintely not mine :P. I had used the same function tag as Shuko in my earlier days, but soon realized it and I've tried to steer away from it (via JSHK instead of SHK).
  5. Yep, was actually thinking on this and was trying to remember if it was hideObject/Global or not :P. Updated post above.
  6. You should be able to click the icon in the editor to turn on ID's of objects, then use nearestObject in conjunction with deleteVehicle.hideObject/Global (as per comment below this post).
  7. Goggles would need to be a mod/addon. Textures are scriptable, models and new items/objects/units/vehicles are not.
  8. Thanks whiztler, wouldn't have been able to get to a computer to properly show it until later :) (on my phone atm).
  9. Your're using forEach incorrectly: { //code } forEach allUnits; Also once you do the above, replace all instances of (_this select 0) with _x.
  10. jshock

    CfgVehicle Patch

    Has to be an addon, no way around it AFAIK.
  11. Yes, that is a bit helpful :P, try this out, probably not the best option (by best I mean optimized), but atm I don't have the time to really sit down and think about it: [ "checkLauncherEH", "onEachFrame", { _launcher = ["rhs_weap_M136_hp","rhs_weap_M136_hedp","rhs_weap_M136"]; { if (_x in _launcher) then { hint format ["Player has a: %1",_x]; }; } forEach weapons player; } ] call BIS_fnc_addStackedEventHandler; Put this in the initPlayerLocal.sqf
  12. How bout: _launcher = ["rhs_weap_M136_hp","rhs_weap_M136_hedp","rhs_weap_M136"]; { if (_x in _launcher) then { hint format ["Player has a: %1",_x]; }; } forEach weapons player;
  13. Good catch There is also this info, maybe out of date: https://community.bistudio.com/wiki/Locality_in_Multiplayer So by this we can also just check to see if the player is the driver as well.
  14. unitName addAction [ "Refuel Vehicle", { vehicle (_this select 0) setFuel 1; _handle = [] spawn { hintSilent "Refueled."; sleep 3; hintSilent ""; }; }, nil, 6, true, true, "", " vehicle _this != _this && vehicle _this isKindOf 'LandVehicle' && fuel vehicle _this < 1 " ]; Works only for Land Vehicles, but that can be changed.
  15. You should be able to access any object's namespace, just so long as your variable set on that object is public, I believe there shouldn't be an issue, so when you go through the iterations of all units you should be able to obtain the object's variables to check for values, you could easily check this with a simple variable to set true/false, make it public, then on the server check all units and return a count of how many returned true for that variable, and maybe even how many return nil, and you should have your answer as to whether the object's namespace is accessible.
  16. Filtering through allUnits should also include any players and the variables being public should make that variable available on the server (I believe :p).
  17. May not work with it like this: While {_RunScript == 1)//<-- } And: (PlayerCloseToEnemy Select 1);// missing '_' in front of variable And I think it should work the way you have it...
  18. Only suggestion I would have is to rework some of the nomenclature of some of the functions, i.e. inTrigger works for both triggers and markers, but in a search for function that would handle finding a position within a marker area, I wouldn't initially assume that inTrigger would also work for a marker.
  19. I would try what Jona recommened, and if this is a direct copy/paste of what you have, your're missing a space between addMagazine and the classname. If none of that works, try using the -showScriptErrors startup parameter and see if there are any other syntactical issues within your code. Another thing, using a switch with only one condition is kinda redundant, should just use an if statement :). And any particular reason you want to remove all KeyDown EHs?
  20. You can just have the condition directly in the waitUntil, no need for the extra "if", and you need to getPosASL within the waitUntil not outside of its scope: waitUntil {(getPosASL player) select 2 >= 1}; I would also recommend having the action removed after the player is less than a few meters, not exactly zero, just to allow a little play room for any Arma logic issue :p.
  21. Well, I don't know why it wouldn't work, did you make sure your classname is correct? The other possibility is the script you are executing may not be executing properly, therefore it seems that the condition of the if statement is wrong, though it may not be.
  22. Try: if (_curWep isEqualTo "hgun_ACPC2_F") then {execVM "Parastore\BuyAmmo\ACPC2.sqf";};
  23. jshock

    Help with task

    You could try: player knowsAbout HVTname > 3cursorTarget may work as well, but I'm not sure the "range" of that and if it would work scoped or looking through binos.
  24. Aside from the name, BIS_fnc_inTrigger will also work for markers, if I remember correctly: https://community.bistudio.com/wiki/BIS_fnc_inTrigger Just put marker name instead of trigger name. My source: https://forums.bistudio.com/topic/170837-how-to-check-if-a-vehicle-is-within-a-markers-position/?hl=bis_fnc_intrigger#entry2668135
×