-
Content Count
3059 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by jshock
-
Draw Arguments from .txt file
jshock replied to ohally's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Why not just move the array of ID's into the script, so it can be directly accessed? -
How can I create an arbitrary position on the map?
jshock replied to Handle1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well there are numerous ways to get a position, not necessarily to create them. Way #1, put markers down in the editor (or created via a script) at each place you want and name them then do something like the below: _mrkArr = ["mrkName1","mrkName2","mrkName3"]; _rndMark = _mrkArr call BIS_fnc_selectRandom; groupName move (getMarkerPos _rndMark); Way #2, go into the editor and hover your mouse over the position you want, and in the bottom left hand corner of your screen you will see Grid: #### X: ###.### Y: ###.### Z:##.#, write down X, Y, & Z then input them into an array exampled below the picture: _mrkArr = [[X, Y, Z], [X, Y, Z], [X, Y, Z]]; _rndMark = _mrkArr call BIS_fnc_selectRandom; groupName move _rndMark; Way #3 & #4, you could use something like BIS_fnc_randomPos or BIS_fnc_findSafePos, to get a random position around a radius of the group, and then just set a move command to that position. -
How can I create an arbitrary position on the map?
jshock replied to Handle1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
You still didn't answer my question though are your talking position or are you talking about an array of different locations (town, FOB, outpost) that are randomly chosen for AI's to then get a waypoint to that location? -
How can I create an arbitrary position on the map?
jshock replied to Handle1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Define what you mean by position? Like: [0,0,0] or a town, FOB, base, village, outpost? -
*Noob Question* about using a trigger
jshock replied to Coolinator's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yea you can use the parentheses if you want to, not necessarily required for single condition. For your is touching ground: ((nuclear in thisList) && {isTouchingGround nuclear}) EDIT: Ninja'd -
*Noob Question* about using a trigger
jshock replied to Coolinator's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Or just keep "this" in the condition and group the trigger to the vehicle. -
You could look into this script for reference: http://www.armaholic.com/page.php?id=23595
-
Script for auto opening Huron's cargo door? (dev branch)
jshock replied to nullrick's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I did this for another thread in the A3 Q&A Forum, but I figured it's relevant here as well, for those interested. Binds user custom action keys #9 and #10 to open/close the rear ramp of the Huron: //in the init.sqf if (hasInterface && !isDedicated) then { _animateDoors = (findDisplay 46) displayAddEventHandler ["KeyDown", { _handled = false; if ((_this select 1) in (actionKeys "User9") && ((typeOf vehicle player) == "B_Heli_Transport_03_F")) then { (vehicle player) animateDoor ["Door_rear_source", 0]; _handled = true; }; if ((_this select 1) in (actionKeys "User10") && ((typeOf vehicle player) == "B_Heli_Transport_03_F")) then { (vehicle player) animateDoor ["Door_rear_source", 1]; _handled = true; }; _handled; }; }; EDIT: For those of you who only want to define one user action key (this is cleaned up a bit as well :D): //in the init.sqf if (hasInterface && !isDedicated) then { _animateDoors = (findDisplay 46) displayAddEventHandler ["KeyDown", { _veh = vehicle player; _handled = false; if ((_this select 1) in (actionKeys "User9") && ((typeOf _veh) == "B_Heli_Transport_03_F")) then { if (((_veh) doorPhase "Door_rear_source") > 0) then { (_veh) animateDoor ["Door_rear_source", 0]; _handled = true; } else { (_veh) animateDoor ["Door_rear_source", 1]; _handled = true; }; }; _handled; }; }; -
Well, if you don't want to script to accomplish this, you will need to get a mod :D (which a mod is technically all scripts in the background :p). Your best bet with a script: http://www.armaholic.com/page.php?id=23113
-
Any way to get player's new body when Respawn without EH?
jshock replied to kovvalsky's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yep, but he had said he wanted to steer away from EHs and Event Scripts. :p -
Insurgency Style Markers & BIS Respawn Points
jshock replied to Kolmain's topic in ARMA 3 - MISSION EDITING & SCRIPTING
No, it should just turn orange when multiple sides are within the same grid square? -
How to Make New Sides (BLUFOR/OPFOR/INDEPENDENT/NEW)
jshock replied to LOzan's topic in ARMA 3 - MISSION EDITING & SCRIPTING
...never mind what was here before... :p Kovvalsky is correct, your just going to have to set the rating of each side. -
Yes, an addon with this function included would be your "global script", and Das has given you some insight into that (unless he is getting at something else :p), and here is another page that might be helpful: https://community.bistudio.com/wiki/ArmA_3_Replacement_Config_Tutorial
-
Any way to get player's new body when Respawn without EH?
jshock replied to kovvalsky's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Well, of course, but I believe it still goes null until the player respawns, at which point I believe the "name" is then reassigned, so I guess if you had a loop running and had a check for if it's null, then a waitUntil it isn't null, then continue with the loop, but who knows, my brain is dead today :confused:. -
Any way to get player's new body when Respawn without EH?
jshock replied to kovvalsky's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ahhh, but as you said, player goes to nullObject after death, so the var name would also return null :p. But couldn't you just have a check, see if _player is null, if it is, get "player" again, then continue on with what you need too? Other than that I might have some sort of concept using get/set variable, but need some time to sit and think about it :p. -
Any way to get player's new body when Respawn without EH?
jshock replied to kovvalsky's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Could you provide more context as to why you can't/won't use an EH, and what script your running that needs the player? Because I can't think of a reason to not just use the EHs. -
Now, for that, I would say you would need to make an addon. Now here I'm completely guessing, but you may be able to get away with do something like this in the description.ext (you may need to include the rest of the config lines): class CfgFaces { class Man_A3 { class Kerry { disabled = 0; }; }; }; Barring that it's disabled for a reason, and only BI can re-enable it, of course :p.
-
Make addAction added to players persist for JIP players.
jshock replied to Rellikplug's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I actually was going to bring that up as well, but wasn't too sure if my thoughts were correct :p. I was also going to bring up the point of publicVariabling the functions, as it made no sense, because every client was going to run through this script. But eh, he did it for whatever reason, so I wasn't going to contest it :D. -
Yes that should work, and to clarify the "z" axis is just the "up and down" of the object, so in this case is the SDV above or below the surface of the water, so if by "spawn in the water" you mean "in" as in below the surface, then yes, that is what a (-) would do. And for the third 50 in your set of arguments, that is the: So you won't want that too high, that one can probably stay at 5-10m.
-
[How-to] ArmA 3 Editor: Creating a JIP Proof COOP MP Mission Task Setup
jshock replied to IT07's topic in ARMA 3 - MISSION EDITING & SCRIPTING
In the examples that I have PMed you with (using BIS_fnc_setTask), you should see WEST somewhere in there, just replace that with "true", and that will make that task available to all playable units. -
Make addAction added to players persist for JIP players.
jshock replied to Rellikplug's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I actually keep forgetting to use the initPlayerLocal/Server.sqf files myself, but they sure do make script locality easy, especially for JIP. -
All the "z" input is, is the "depth"/altitude of the object/vehicle, so all changing the "z" value will do is change the depth of the sub in the water, _SDV being 10m into the water, _SDV1 being 15m into the water. Sorry, misread a bit, yes it would make sense that should work, but if it doesn't then just use setPos again. As far as them spawning on land, with what you have, _newPos is only looking for a safe position in a 10m radius around the _markerAO, so I would recommend making sure that either the marker is directly over a water area, or expanding the radius that BIS_fnc_findSafePos is looking for.
-
is there a lightsource besides fireplace and lantern???
jshock replied to Coolinator's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just another alternative, so that you can just use the direction that the game logic itself is at: light setDir (getDir this);//should work -
Using the configViewer would be your best bet at finding them, then something like the following: (configFile >> "CfgFaces" >> ...rest of config directory...) EDIT: Got bored: (configfile >> "CfgFaces" >> "Kerry" >> "Kerry") (configfile >> "CfgFaces" >> "Kerry" >> "Kerry_A_F") (configfile >> "CfgFaces" >> "Kerry" >> "Kerry_B1_F") (configfile >> "CfgFaces" >> "Kerry" >> "Kerry_B2_F") (configfile >> "CfgFaces" >> "Kerry" >> "Kerry_C_F")
-
Make addAction added to players persist for JIP players.
jshock replied to Rellikplug's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try putting the init.sqf call for this into the initPlayerLocal.sqf instead, that way it executes at mission start and for all JIP. https://community.bistudio.com/wiki/Event_Scripts