Jump to content

jshock

Member
  • Content Count

    3059
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by jshock

  1. Why not just move the array of ID's into the script, so it can be directly accessed?
  2. 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.
  3. 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?
  4. Define what you mean by position? Like: [0,0,0] or a town, FOB, base, village, outpost?
  5. 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
  6. Or just keep "this" in the condition and group the trigger to the vehicle.
  7. jshock

    Para code for weapons

    You could look into this script for reference: http://www.armaholic.com/page.php?id=23595
  8. 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; }; };
  9. jshock

    Para code for weapons

    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
  10. Yep, but he had said he wanted to steer away from EHs and Event Scripts. :p
  11. No, it should just turn orange when multiple sides are within the same grid square?
  12. ...never mind what was here before... :p Kovvalsky is correct, your just going to have to set the rating of each side.
  13. jshock

    Binding keys to menu actions

    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
  14. 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:.
  15. 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.
  16. 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.
  17. 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.
  18. 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.
  19. jshock

    RPT errors question

    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.
  20. 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.
  21. I actually keep forgetting to use the initPlayerLocal/Server.sqf files myself, but they sure do make script locality easy, especially for JIP.
  22. jshock

    RPT errors question

    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.
  23. Just another alternative, so that you can just use the direction that the game logic itself is at: light setDir (getDir this);//should work
  24. 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")
  25. 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
×