Jump to content

deadlyhabit

Member
  • Content Count

    48
  • Joined

  • Last visited

  • Medals

Everything posted by deadlyhabit

  1. Ok so I'm trying to port over a script I made in Arma 2 with almost 90% success and need a little bit of help from some of the scripting wizards on here. What it's supposed to do: Randomly place a disarmed hostage that doesn't move along with 4 armed guards in one of 6 named markers on the map. Hostage has as added action of untie which silently joins him to your group. Mission ends when hostage is brought to a named Extraction marker. What is currently happening: Everything is working fine with the exception of the hostage not staying put and running all over the place of his own AI free will. The Scripts: init.sqf gue_random6.sqf Hostage_male.sqf Hostagevars.sqf Download with demo mission: http://www.mediafire.com/?q6vnjnye97mjphn Also does anyone know if there is an updated list of Moves akin to this for Arma 2/OA? http://community.bistudio.com/wiki/ArmA2:_Moves Cheers guys.
  2. deadlyhabit

    Take On Video Settings! - Discuss

    Normally I do keep it overclocked, but this summer been having cooling issues in general with a heatwave so had to roll it back to stock for the time being. I'm just not understanding where my performance hit is coming from settings wise as I've said my differences in ArmA from the rollback have been negligible FPS wise. It seems like no matter what settings I use I'm getting around 20 FPS average on the Benchmark. Edit: Overclocking did boost my FPS a bit, but not a whole lot.
  3. deadlyhabit

    Take On Video Settings! - Discuss

    Anyone have any suggestions for some tweaks so I can get at least 30fps average? I've tried following the guide and spent an hour or so trying to tweak to no avail. System Specs: i7 940 @ 2.93 Ghz 12 GB DDR3 1600 RAM 1 TB 7200RPM HD Radeon HD 5770 1GB video card I never had this much of an issue with the ArmA titles and managed to get them running in good FPS no problem.
  4. Is there a trick to getting SweetFX working when launching Arma 2:CO or Arma 3 using Play withSIX? When I launch through Steam it works no problem, but using Play withSIX SweetFX is disabled in 2 CO and 3. Also Play withSIX seemed to make my 3 Steam launch unusable due to a couple errors with shaders and such...
  5. If the bunker has positions in it like say a house you could use the buildingPos command like _soldier setPos (_house1 buildingPos 2)
  6. So I have a script that in theory should be working, but I'm having a few issues. First sometimes the units aren't spawning into building positions. Second sometimes by the time I get to the location the units are already dead. Third for some reason even though I have independents set to be friendly to OPFOR, they're not attacking my unit. I'm using invisible helipads for the Hostage1, Hostage2 etc positioning. Any advice or help would be greatly appreciated. ///////////////////////////////////////////////////////// // Randomize placement of a group within 7 spots // random.sqf ///////////////////////////////////////////////////////// if (! isServer) exitwith {}; // NOTE: in multiplayer, only server should create random numbers. // Create Group for units to be spawned into; must have group created BEFORE spawning units in. _SideHQ = createCenter resistance; _SideHQ1 = createCenter civilian; groupAlpha = createGroup resistance; groupHostage = createGroup civilian; // Pick Location /////////////////////////////////////////////////////////////////////// _posHostage = [Hostage1, Hostage2, Hostage3, Hostage4, Hostage5, Hostage6, Hostage7] call BIS_fnc_selectRandom; _extraction = getMarkerPos "Extraction"; _house = nearestBuilding _posHostage; _position = 0; HostageString = format ["%1",_posHostage]; //Generate Hostage H1 = groupHostage createUnit ["Rocker1", (_house buildingPos _position), [], 0, "NONE"]; removeAllWeapons H1; nul = [H1] execVM "Hostage_male.sqf"; //Generate Soldiers G1 = groupAlpha createUnit ["GUE_Soldier_3", (_house buildingPos (_position+1)), [], 0, "NONE"]; G1 setdir 360; G1 setSkill 1; G2 = groupAlpha createUnit ["GUE_Soldier_AR", (_house buildingPos (_position+2)), [], 0, "NONE"]; G2 setdir 360; G2 setSkill 1; G3 = groupAlpha createUnit ["GUE_Soldier_MG", (_house buildingPos (_position+3)), [], 0, "NONE"]; G3 setdir 360; G3 setSkill 1; G4 = groupAlpha createUnit ["GUE_Soldier_MG", (_house buildingPos (_position+4)), [], 0, "NONE"]; G4 setdir 360; G4 setSkill 1; G5 = groupAlpha createUnit ["GUE_Soldier_Medic", (_house buildingPos (_position+5)), [], 0, "NONE"]; G5 setdir 360; G5 setSkill 1; //Triggers //Victory _trgVic = createTrigger ["EmptyDetector" , getMarkerPos "Extraction"]; _trgVic setTriggerArea [50, 50, 0, false]; _trgVic setTriggerType "END1"; _trgVic setTriggerActivation ["ANY", "PRESENT", false]; _trgVic setTriggerTimeout [10, 10, 10, false ]; _trgVic setTriggerStatements ["H1 in thislist", "", ""]; //Loss _trgLoss = createTrigger["EmptyDetector", getPos H1]; _trgLoss setTriggerArea [0, 0, 0, false]; _trgLoss setTriggerType "LOOSE"; _trgLoss setTriggerActivation ["ANY", "PRESENT", false]; _trgLoss setTriggerTimeout [10, 10, 10, false ]; _trgLoss setTriggerStatements ["!(alive H1)", "", ""];
  7. deadlyhabit

    Add Night vision goggles

    this additem "NVGoggles";this assignitem "NVGoggles";this action["NVGoggles", this]; That gives you the goggles, assigns them to the slot, and starts you with them turned on.
  8. I wish I still had my dog, seeing her and her reaction when I came back from a year in Iraq... nothing beats a dogs unconditional love and trust. I agree, don't neglect your pets, because someday they won't be there. So to make this a bit more on topic for the board, who's gonna do what when the dog models get added (or imported from 2) into 3?
  9. deadlyhabit

    Dynamic Guarded Hostage Rescue

    Quick little revision to Hostage_male.sqf if you want the hostage to be in the surrender animation stance instead of sitting: // execute with in units initline. // _null = [this] execVM "Hostage_male.sqf" // hostage _CivnotRescued = true; _man = _this select 0; _man setcaptive true; _man disableAI "MOVE"; //_man action ["SITDOWN",_man]; _man switchMove "AmovPercMstpSsurWnonDnon"; _man disableAI "ANIM"; _hostageact1 = _man addaction ["Untie","Hostagevars.sqf"]; while {_CivnotRescued} do { if (not(captive _man)) then {_CivnotRescued = false}; if (not alive _man) exitwith {_man removeaction _hostageact1}; sleep 1; }; _man removeaction _hostageact1; if (alive _man) then { player attachto [_man,[0,-0.9,0]]; player setdir 0; player switchmove "AinvPknlMstpSnonWrflDnon_medic"; sleep 3; player switchmove "AinvPknlMstpSnonWrflDnon_medicEnd"; sleep 1; player switchmove ""; _man enableAI "ANIM"; _man switchmove "SitStandUp"; detach player; sleep 2; _man enableAI "MOVE"; // just put // before this if you dont want the unit to join your group [_man] joinsilent player; }; If you want to have the hostage sitting, just remove the comment bit on //_man action ["SITDOWN",_man]; and add it to _man switchMove "AmovPercMstpSsurWnonDnon";
  10. BIS_fnc_liveFeedModuleEffects /* Author: Thomas Ryan Description: Add effects to a live feed via a module. Parameters: _this: OBJECT - Live Feed - Effects module */ // They ran me on a dedicated server. I stopped their function. if (isDedicated) exitWith {true}; // Wait for a live feed to exist waitUntil {!(isNil "BIS_liveFeed")}; private ["_module"]; _module = [_this, 0, objNull, [objNull]] call BIS_fnc_param; // Apply defined effects private ["_mode"]; _mode = _module getVariable "EffectMode"; _mode call BIS_fnc_liveFeedEffects; true BIS_fnc_liveFeedInit /* Author: Thomas Ryan Description: Display a live feed via a module. Parameters: _this: OBJECT - Live Feed - Init module */ // Need not be run on dedicated servers if (isDedicated) exitWith {true}; private ["_module"]; _module = [_this, 0, objNull, [objNull]] call BIS_fnc_param; // Find player private ["_units"]; _units = _module call BIS_fnc_moduleUnits; if (player in _units) then { // Create the feed [player, player, player] call BIS_fnc_liveFeed; }; true BIS_fnc_liveFeedModuleSetSource /* Author: Thomas Ryan Description: Set a live feed's source via a module. Parameters: _this: OBJECT - Live Feed - Set Source module */ // <insert smart comment about dedicated servers here> if (isDedicated) exitWith {true}; // Wait for a live feed to exist waitUntil {!(isNil "BIS_liveFeed")}; waitUntil {camCommitted BIS_liveFeed}; private ["_module"]; _module = [_this, 0, objNull, [objNull]] call BIS_fnc_param; // Find synchronized units private ["_units"]; _units = _module call BIS_fnc_moduleUnits; if (count _units == 0) exitWith {"No synchronized units found" call BIS_fnc_error; false}; // Set the live feed's source [[_units select 0, [0, 0, 2]]] call BIS_fnc_liveFeedSetSource; true BIS_fnc_liveFeedModuleSetTarget /* Author: Thomas Ryan Description: Set a live feed's target via a module. Parameters: _this: OBJECT - Live Feed - Set Target module */ // On dedicated servers, player is not you if (isDedicated) exitWith {true}; // Wait for a live feed to exist waitUntil {!(isNil "BIS_liveFeed")}; waitUntil {camCommitted BIS_liveFeed}; private ["_module"]; _module = [_this, 0, objNull, [objNull]] call BIS_fnc_param; // Find synchronized units private ["_units"]; _units = _module call BIS_fnc_moduleUnits; // Determine target type private ["_type"]; _type = parseNumber (_module getVariable "TargetType"); if (_type == 0 && count _units == 0) exitWith {"No synchronized units found" call BIS_fnc_error; false}; // Set target private ["_target"]; _target = if (_type == 0) then {_units select 0} else {position _module}; _target call BIS_fnc_liveFeedSetTarget; true Just toss a trigger in editor like so and call it from your radio to look at all the functions in game
  11. deadlyhabit

    Dynamic Guarded Hostage Rescue

    Alright I have it working like I want and I think it should be MP compatible if anyone wants to test it. Usage: Place 6 Invisible Helipads units on the map named Hostage1, Hostage2, Hostage3 etc and one marker named Extraction. A hostage guarded by 4 OPFOR soldiers will be spawned at one of these 6 locations, he won't move and has an untie action bound to him which will cause him to stand, and silently join your group. Get him to the Extraction marker zone to execute the trigger in the script (in this case Victory, but that can obviously be tweaked), or if he is killed failure. Download with demo mission Download random6.sqf ///////////////////////////////////////////////////////// // Randomize placement of a group within 6 spots // gue_random6.sqf ///////////////////////////////////////////////////////// if (! isServer) exitwith {}; // NOTE: in multiplayer, only server should create random numbers. // Create Group for units to be spawned into; must have group created BEFORE spawning units in. _SideHQ = createCenter east; _SideHQ1 = createCenter civilian; groupAlpha = createGroup east; groupHostage = createGroup civilian; // Pick Location /////////////////////////////////////////////////////////////////////// _posHostage = [Hostage1, Hostage2, Hostage3, Hostage4, Hostage5, Hostage6] call BIS_fnc_selectRandom; _extraction = getMarkerPos "Extraction"; // Show Enemy Spawn Location as a GPS Coord in Hint _gridPos = mapGridPosition _posHostage; hint format ["Position %1", _gridPos]; //Generate Hostage H1 = groupHostage createUnit ["C_man_1", _posHostage, [], 0, "FORM"]; removeAllWeapons H1; nul = [H1] execVM "Hostage_male.sqf"; //Generate Soldiers G1 = groupAlpha createUnit ["O_Soldier_AR_F", _posHostage, [], 0, "FORM"]; G1 setdir 360; G2 = groupAlpha createUnit ["O_soldier_M_F", _posHostage, [], 0, "FORM"]; G2 setdir 360; G3 = groupAlpha createUnit ["O_Soldier_GL_F", _posHostage, [], 0, "FORM"]; G3 setdir 360; G4 = groupAlpha createUnit ["O_Soldier_lite_F", _posHostage, [], 0, "FORM"]; G4 setdir 360; //Triggers //Victory _trgVic = createTrigger ["EmptyDetector" , getMarkerPos "Extraction"]; _trgVic setTriggerArea [50, 50, 0, false]; _trgVic setTriggerType "END1"; _trgVic setTriggerActivation ["ANY", "PRESENT", false]; _trgVic setTriggerTimeout [10, 10, 10, false ]; _trgVic setTriggerStatements ["H1 in thislist", "", ""]; //Loss _trgLoss = createTrigger["EmptyDetector", getPos H1]; _trgLoss setTriggerArea [0, 0, 0, false]; _trgLoss setTriggerType "LOOSE"; _trgLoss setTriggerActivation ["ANY", "PRESENT", false]; _trgLoss setTriggerTimeout [10, 10, 10, false ]; _trgLoss setTriggerStatements ["!(alive H1)", "", ""]; Hostage_male.sqf // execute with in units initline. // _null = [this] execVM "Hostage_male.sqf" // hostage _CivnotRescued = true; _man = _this select 0; _man setcaptive true; _man disableAI "MOVE"; _man disableAI "ANIM"; _man action ["SITDOWN",_man]; _hostageact1 = _man addaction ["Untie","Hostagevars.sqf"]; while {_CivnotRescued} do { if (not(captive _man)) then {_CivnotRescued = false}; if (not alive _man) exitwith {_man removeaction _hostageact1}; sleep 1; }; _man removeaction _hostageact1; if (alive _man) then { player attachto [_man,[0,-0.9,0]]; player setdir 0; player switchmove "AinvPknlMstpSnonWrflDnon_medic"; sleep 3; player switchmove "AinvPknlMstpSnonWrflDnon_medicEnd"; sleep 1; player switchmove ""; _man enableAI "ANIM"; _man switchmove "SitStandUp"; detach player; sleep 2; _man enableAI "MOVE"; // just put // before this if you dont want the unit to join your group [_man] joinsilent player; }; Hostagevars.sqf // set unit not captive _unit=_this select 0; _unit setcaptive false;
  12. deadlyhabit

    Dynamic Guarded Hostage Rescue

    Thanks man, any tips on finding the ones I'm apparently missing?
  13. deadlyhabit

    Dynamic Guarded Hostage Rescue

    Weird how'd I miss that, been using this link as my ref for ArmA 3 http://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3 You don't happen to have a link to the current or A3 available switchMove available strings do you? Apparently my gogglefu is lacking
  14. deadlyhabit

    Dynamic Guarded Hostage Rescue

    Because I've never seen that command or documentation on it. BIS_fnc_selectRandom can you hook me up with some more info?
  15. deadlyhabit

    Dynamic Guarded Hostage Rescue

    Appreciated, ok so currently it uses markers for the zones the hostage and guards are spawned to. So a command like this works because getMarkerPos calls for a string _markerPos = getMarkerPos format ["markerA%1",round ((random 6) + 0.5)]; so this works fine when using markers Now when I switch to the Invisible Helipad unit, I need to use getPos getPos requires an object for it's argument, so I either need to redo my script to use a random into an if then setup or a switch Or if I can convert a string to an object it saves me doing that, and a bunch of redundant lines that will be copy pasted for an if then or switch script. Make sense? Maybe that old thread when I first started this in Arma 2 may help make a bit more sense http://forums.bistudio.com/showthread.php?94646-Random-spawn-positions-for-AI Cheers for removing statements and such, I've done such already as this was made when I first started scripting in Arma and looking at it everytime I have bits open in notepad++ I'm tweaking and seeing things to lose and optimize. Good old motto of always keep learning.
  16. Unless you're actually using your cars array multiple times you don't have to define it beforehand. You can just do it right within the function. {veh = [_x] execVM "vehicle.sqf"} forEach [car1,car2,car3,car4]; cuts down the lines you need.
  17. deadlyhabit

    Dynamic Guarded Hostage Rescue

    Yea the hostage_male I original nicked from that, but I'm in the process of tweaking it and refining it (hell I already did some that I haven't posted yet last night). The gue_random6 on is my own little invention with some help from the Arma 2 scripting board back before I knew what I did now, but it's also been refined and now I'm revisiting it with some actual knowledge and hopefully will have something that is MP compatible as well. Here's the Arma 2 script thread where it started if you want to take a gander http://forums.bistudio.com/showthread.php?94646-Random-spawn-positions-for-AI I'm gonna run to the store in a bit, grab a 12 pack and sit down and try to get something with some more functionality. As is in SP it works fine with the marker setup though. I'm thinking that my initial switch method that the final poster in that thread got working by not using local variables (oopsie on my part) my be the way to go.
  18. deadlyhabit

    Dynamic Guarded Hostage Rescue

    Ok so revisiting this is there an easy way to convert a string to an object? Or am I better off using an if, then or switch structure for my randomization to just bypass that altogether?
  19. Ah good point, force of habit for me since I generally do more scripting is to immediately go straight to a new file outside of init.sqf. Your right about the vehicles command as well, slipped my mind last night. Well now you have 2 ways to do it, one where all vehicles are selected by the vehicles command, or you can pick and choose via specific named ones like in the method I had before. Should offer a nice flexibility and hopefully a rather painless introduction into scripting ;)
  20. It should be in a new script file, I shouldn't have used vehicles.sqf as my name as it could easily be confusing. Name it respawn.sqf and place that code in it. Then create an init.sqf and put execVM "vehicles.sqf"; if(true) exitWith {}; in it. You should now have a mission.sqm, vehicle.sqf, respawn.sqf, and init.sqf in your mission folder. Save and preview in editor now and everything should function fine. edit: Like so just I named my script file vehicles.sqf which I said was kind of a poor name choice given the originals name.
  21. deadlyhabit

    Dynamic Guarded Hostage Rescue

    Ok so I'm trying to refine this a bit more and switch from markers to invisible helipads at least for the hostage * soldier spawn points so they can be placed into buildings and at specific heights. The issue I'm having now is while I'm still using named objects, my command to randomly generate the position returns a string. Does anyone know how to convert a string to an object which is needed for getPos? The closest I could find was in this old thread http://forums.bistudio.com/showthread.php?18567-Converting-string-value-to-object-name! but it seems to suffer from the forum software being updated and old posting conventions being broken. I was trying the new to Arma 3 command objectFromNetID but it doesn't seem to do the task (honestly have no real clue what it's for, wishful thinking)
  22. deadlyhabit

    Dynamic Guarded Hostage Rescue

    Thanks for trying to help, but I actually found my error while attempting to implement your solution. I had to move _man disableAI "MOVE"; up in my Hostage_male.sqf file like so // execute with in units initline. // _null = [this] execVM "Hostage_male.sqf" // hostage _CivnotRescued = true; _man = _this select 0; _man setcaptive true; _man disableAI "MOVE"; _hostageact1 = _man addaction ["Untie","Hostagevars.sqf"]; while {_CivnotRescued} do { _num=(ceil(Random 3)); if (_num==0) then {_man switchmove "civilsitting"}; if (_num==1) then {_man switchmove "civilsitting01"}; if (_num==2) then {_man switchmove "civilsitting02"}; if (_num==3) then {_man switchmove "civilsitting03"}; sleep 1; if (not(captive _man)) then {_CivnotRescued = false}; if (not alive _man) exitwith {_man removeaction _hostageact1}; sleep 1; if (not(captive _man)) then {_CivnotRescued = false}; if (not alive _man) exitwith {_man removeaction _hostageact1}; sleep 1; if (not(captive _man)) then {_CivnotRescued = false}; if (not alive _man) exitwith {_man removeaction _hostageact1}; sleep 1; if (not(captive _man)) then {_CivnotRescued = false}; if (not alive _man) exitwith {_man removeaction _hostageact1}; sleep 1; if (not(captive _man)) then {_CivnotRescued = false}; if (not alive _man) exitwith {_man removeaction _hostageact1}; sleep 1; if (not(captive _man)) then {_CivnotRescued = false}; if (not alive _man) exitwith {_man removeaction _hostageact1}; sleep 1; if (not(captive _man)) then {_CivnotRescued = false}; if (not alive _man) exitwith {_man removeaction _hostageact1}; sleep 1; if (not(captive _man)) then {_CivnotRescued = false}; if (not alive _man) exitwith {_man removeaction _hostageact1}; sleep 1; if (not(captive _man)) then {_CivnotRescued = false}; if (not alive _man) exitwith {_man removeaction _hostageact1}; sleep 1; if (not(captive _man)) then {_CivnotRescued = false}; if (not alive _man) exitwith {_man removeaction _hostageact1}; }; _man removeaction _hostageact1; if (alive _man) then { player attachto [_man,[0,-0.9,0]]; player setdir 0; player switchmove "AinvPknlMstpSnonWrflDnon_medic"; sleep 3; player switchmove "AinvPknlMstpSnonWrflDnon_medicEnd"; sleep 1; player switchmove ""; _man switchmove "SitStandUp"; detach player; sleep 2; _man enableAI "MOVE"; // just put // before this if you dont want the unit to join your group [_man] joinsilent player; }; It's working properly now, but going to try to refine it a bit more add some more comments and a readme, then it should be ready for mission makers to use.
  23. Well I tested it out for you and my initial code was a tad wrong, so went back and fixed it for your vehicles.sqf or whatever you name it, it would be this: {veh = [_X] execVM "vehicle.sqf"} forEach [Chopper1, Chopper2, Chopper3, Chopper4]; What it does is executes the command in the {}s substituting the _X for each member in the array [] in this case 4 named choppers.
  24. In a new script file in your mission folder something like vehicles.sqf then create an init.sqf with the following: execVM "vehicles.sqf"; if(true) exitWith {};
  25. Ah ok so it looks like this script accepts an array as it's input already so veh = [Chopper1, Chopper2, etc] execVM "vehicle.sqf"; won't work. I'm thinking this may work {veh = [this] execVM "vehicle.sqf" _X} forEach [Chopper 1, Chopper2, etc];
×