Jump to content

siggy

Member
  • Content Count

    9
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About siggy

  • Rank
    Private
  1. perhaps set the APC's to captive, the plane should then ignore them - perhaps also experiment with: {_x allowDamage false} forEach [harrier,(driver harrier)]; APC's would then shoot at the harrier but be unable to down it. There are probably better ways of achieving this though. Other things to try would be to remove the harrier's other weapons (cannon, missiles etc) to stop it doing strafing runs.
  2. Try "doFollow" instead of doMove. Whilst the warlord is in a vehicle, none of these commands will work, as the warlord doesn't technically have his own position (I stand to be corrected!) - you want to find the position of the vehicle he is in. Try: (leader myAIteam) doMove (position (vehicle warlord)); doXxx commands are given to individual units and not groups, the above syntax therefore gives the doMove command to the leader of your AI squad. If the warlord is on-foot then "vehicle warlord" is himself - i.e. (vehicle warlord) = warlord - meaning that this command should work whether he is in a vehicle or not.
  3. Thanks for the info! It appears the engine's pretty rigid when it comes to selecting the mode - if I define them all with the same range/prob values, it always picks single shot - like you say, the first one that matches. Cheers
  4. So I'm making little mod to increase the RoF of the Mk19, AGS-17 and AGS-30 to real-world values. That's simple enough but I also want to get the AI using varying length automatic bursts of up to 5 rounds at up to 1500m. I've created 5 different modes for the bursts I want them to use but I think need some help with getting the AI to use them. I don't understand the minRange, midRange, maxRange and probabilities enough to be able to tweak it right. Here's what I have so far... class MK19 : MGun { reloadTime = 0.175; modes[] = {"FullAuto_Player","FullAuto_AI_B2","FullAuto_AI_B3","FullAuto_AI_B4","FullAuto_AI_B5"}; class FullAuto_Player: Mode_FullAuto { displayName = "HEDP"; sound[] = {"\Vops_s_Guns\mk19_s.wss", 10, 1, 120}; showToPlayer = 1; reloadTime = 0.175; dispersion = 0.01; burst = 1; aiRateOfFire = 1.5; aiRateOfFireDistance = 500; minRange = 250; minRangeProbab = 0.1; midRange = 500; midRangeProbab = 0.3; maxRange = 1500; maxRangeProbab = 0.1; }; class FullAuto_AI_B2: FullAuto_Player { displayName = "2Rnd Burst"; burst = 2; aiRateOfFire = 4; minRange = 200; minRangeProbab = 0.3; midRange = 400; midRangeProbab = 0.6; maxRange = 1200; maxRangeProbab = 0.2; soundBurst = 0; showToPlayer = 0; }; class FullAuto_AI_B3: FullAuto_AI_B2 { displayName = "3Rnd Burst"; burst = 3; aiRateOfFire = 4.5; minRange = 150; minRangeProbab = 0.5; midRange = 300; midRangeProbab = 0.7; maxRange = 900; maxRangeProbab = 0.3; }; class FullAuto_AI_B4: FullAuto_AI_B2 { displayName = "4Rnd Burst"; burst = 4; aiRateOfFire = 5.0; minRange = 100; minRangeProbab = 0.7; midRange = 200; midRangeProbab = 0.9; maxRange = 600; maxRangeProbab = 0.4; }; class FullAuto_AI_B5: FullAuto_AI_B2 { displayName = "5Rnd Burst"; burst = 5; aiRateOfFire = 5.5; minRange = 10; minRangeProbab = 0.7; midRange = 100; midRangeProbab = 0.9; maxRange = 300; maxRangeProbab = 0.5; }; }; Appreciated if anyone can offer some advice :) I will try to release the PBO once done!
  5. Nice one! I'm testing in v1.56 and do not need to switch to command view. It doesn't de-select the units until after I've done the 0-0-x, in 1st Person - works a treat :) Scenario is a 4 man PMC team with a Land Rover. An ammo crate with some fancy weapons is attached to the vehicle using attachTo. Radio Juliet: nul = (groupSelectedUnits player) execVM "Rearm.sqf"; //Rearm.sqf //--------- //Check only one unit's selected if (count _this == 1) then { //If they're in a vehicle, check it's not moving, before jumping out _pmc = _this select 0; if ((!(vehicle _pmc == _pmc)) and (speed (vehicle _pmc) > 0.5)) then { hintSilent "Unit is moving too fast!" } else { //If in a stationary vehicle, get out and move to the ammo crate if (!(vehicle _pmc == _pmc)) then { _pmc action ["GetOut",vehicle _pmc]; _pmc commandMove (position pmc_ammo) } //Otherwise, just move to the crate else { //If close enough, open the gear menu between the unit and the crate if (_pmc distance pmc_ammo > 4.5) then { _pmc commandMove (position pmc_ammo) } else { _pmc action ["GEAR",pmc_ammo] }; }; }; } else { hint "Select a single unit!" }; I appreciate the help!
  6. Just a quickie... I've trawled comref and suspect that this can't be done - perhaps somebody can say definitively! I'd like to return an array of the units that I have selected along the bottom of my screen (i.e. the group members I've selected using F1 to F12). The idea is to then pass this array into a script. Can't find anything though :(
  7. Thanks WoodyUK, _killed is the name of unit that was killed. "faction _killed" returns the faction of that unit as a value to show whether they're BAF, USMC or CDF (who are all BLUFOR). The hintSilent I used as a debug to shows that this returns a value correctly (and these are the values I've then added for each case). The switch needs to use this faction of the dead unit to then pick a random replacement from the relevant array. Sample Briefing.sqf: // A2BM W  € € 110 // DO NOT EDIT THIS FILE waitUntil {!(isNull player)}; waitUntil {player==player}; switch (side player) do { case WEST: { player createDiaryRecord ["Diary",["briefing","As the tensions grow between Takistan and NATO about arms control of a WMD (Weapons of Mass Destruction), Alliance decided to take a further actions. Couple squadrons of fighter aircrafts and helicopters are situated in the <marker name='military_base_west'>Military Base</marker> near border with Takistan. Takistani Armed Forces believe that the first step is made...<br/> In order to prevent first strike, Takistani Armed Forces Command order to one "L-39 Albatros" squadron to take-off from the <marker name='airfield_east'>airfield</marker> near Loy Manara and move toward <marker name='military_base_west'>Miltary Base</marker> near Rasman in order to remove the threat."]]; }; case EAST: { }; case RESISTANCE: { }; case CIVILIAN: { }; }; ---------- Post added at 02:45 AM ---------- Previous post was at 02:07 AM ---------- Sorted! Squint warned that the comparing strings in switches was case sensitive. The case was correct however as I'm comparing to a string, made me think that the values for each case should be enclosed in quotes: _soldier = switch (faction _killed) do { case "RU": {RU_array select (random ((count RU_array) -1))}; case "USMC": {USMC_array select (random ((count USMC_array) -1))}; case "BIS_US": {US_array select (random ((count US_array) -1))}; case "BIS_BAF": {BAF_array select (random ((count BAF_array) -1))}; case "BIS_TKA": {TKA_array select (random ((count TKA_array) -1))}; }; Schoolboy error! Thanks :)
  8. Hey folks. Apologies if I am posting in the wrong place! I'm having a bit of trouble with a switch statement that I've put into an SQF script and am hoping if someone is able to spot what I'm doing wrong? I've added a killed event handler to allUnits with the following in the init line of the player: {_x addEventHandler ["killed", {[(_this select 0),(group (_this select 0))] execVM "Killed.sqf";}];} forEach allUnits; This is a SP mission and the idea is to keep replacing units within a group from a random array of units. Here's Killed.sqf... _killed = _this select 0; _group = _this select 1; _soldier = switch (faction _killed) do { case RU: {RU_array select (random ((count RU_array) -1))}; case USMC: {USMC_array select (random ((count USMC_array) -1))}; case BIS_US: {US_array select (random ((count US_array) -1))}; case BIS_BAF: {BAF_array select (random ((count BAF_array) -1))}; case BIS_TKA: {TKA_array select (random ((count TKA_array) -1))}; }; //hintSilent format ["%1",(faction _killed)]; _soldier createUnit [(getMarkerPos "spawnPos"),_group,"this addEventHandler [""killed"",{[(_this select 0),(group (_this select 0))] execVM ""Killed.sqf""}];"]; exit; I'm just trying to get the basic script working ATM. Arrays for each faction are defined in the init.sqf file. "spawnPos" is an empty marker on the map etc. If I uncomment out the hintSilent, it correctly shows me the faction of the dead unit (which should match one of the cases!) though I get no replacement unit unless I replace the entire switch statement with a generic: _soldier = faction_array select (random ((count faction_array) -1)); I've been doing simple little scripts since the days of OFP but I can't figure this one out! It's like the returned faction doesn't match any of the cases?? I have examined examples in NORRIN's revive scripts and the breifing.sqf files and can't see what the problem is :( Any help is much appreciated!
  9. siggy

    RH Aks Pack ver 1.2

    excellent weapon pack. could maybe do with an alternate config to use HiFi's sound mods? same for your other work too. nice stuff!
×