-
Content Count
3059 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by jshock
-
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.
-
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;
-
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";
-
Random object placement spawning as set
jshock replied to redarmy's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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). -
How block artillery at start and later usable after trigger event?
jshock replied to majorexperimental's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Block? -
How Do You Remove Game Objects?
jshock replied to maihym's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yep, was actually thinking on this and was trying to remember if it was hideObject/Global or not :P. Updated post above. -
How Do You Remove Game Objects?
jshock replied to maihym's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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). -
Adding custom items/user made content directly to a mission
jshock replied to Vectif's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Goggles would need to be a mod/addon. Textures are scriptable, models and new items/objects/units/vehicles are not.- 9 replies
-
- 1
-
- Custom Items
- Automatic download f/ mission
-
(and 1 more)
Tagged with:
-
Changing AI/Unit Loadout on Mission Start in Singleplayer?
jshock replied to Neviothr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks whiztler, wouldn't have been able to get to a computer to properly show it until later :) (on my phone atm). -
Changing AI/Unit Loadout on Mission Start in Singleplayer?
jshock replied to Neviothr's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Your're using forEach incorrectly: { //code } forEach allUnits; Also once you do the above, replace all instances of (_this select 0) with _x. -
Has to be an addon, no way around it AFAIK.
-
Detect if player has weapon/launcher
jshock replied to Sweedn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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 -
Detect if player has weapon/launcher
jshock replied to Sweedn's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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; -
Refuel vehicle add action on unit?
jshock replied to Gruntini's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Refuel vehicle add action on unit?
jshock replied to Gruntini's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
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.
-
[FEEDBACK] Do you use BIS_fnc_xxxxx functions? If you do....
jshock replied to killzone_kid's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Why does this not work in ArmA 3?
jshock replied to aerocurt234's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
Need help, making parachute action script.
jshock replied to aerocurt234's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Why does this not work in ArmA 3?
jshock replied to aerocurt234's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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. -
Why does this not work in ArmA 3?
jshock replied to aerocurt234's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try: if (_curWep isEqualTo "hgun_ACPC2_F") then {execVM "Parastore\BuyAmmo\ACPC2.sqf";}; -
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.
-
Check if and what markers are inside a marker - possible?
jshock replied to mdtorch's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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