Jump to content

Ice_Rhino

Member
  • Content Count

    312
  • Joined

  • Last visited

  • Medals

  • Medals

Posts posted by Ice_Rhino


  1. HI B,

    I played through my mission too many times. Some of those times, when the BLU force I am over watching for is engaged, they seem to stay for an unrealistic time at whatever point it is before progressing along their path. I was just looking to get them to reevaluate their situation quicker than normal. I want them to engage if they have to, but just return to the path quicker if clear to do so.

    Any clearer?

    T


  2. Hi All,

    I am using the following code to make the soldier walk with his gun on his back. However, when engaged, he drops to one knee and just stays there indefinitely. I just want him to patrol with his gun on his back until such time as he is engaged or he detects BluFor. Code as follows;

    this setCombatMode "RED"; this disableAI "ANIM"; 0 = this spawn {waitUntil {time > 0}; _this switchMove "AmovPercMwlkSnonWnonDfl"};
    

    Any ideas?


  3. I have a team that moves through a town whilst the players provide Overwatch. Sometimes however they engage in combat with AI the players have missed and it kind of screws up their behavior long term. I am more than happy for them to engage in the initial gun fight though.

    I am wondering what the most efficient method is for them to reevaluate their situation after a given amount of time and then return to their WP path through the town. Guess with the right commands I could under a trigger.

    My question is two fold;

    1. Can you reset their behavior or reevaluate after a given amount of time

    2. Is it possible to capture an event which triggers as them being under fire. That way they could make a radio call to the players that they need help and are under fire???

    Thanks


  4. JS,

    So now the code looks like the following and still I have stock Sniper equipment. I trust in you completely but I am obvious doing something stupid here. I hope your patience lasts :)

    _unit = (_this select 0); 
    
    
    if (typeOf _unit == "B_Sniper_F") then { 
    
    
    _arrayOfItems = ["ItemCompass", "itemGPS", "itemMap", "itemRadio", "itemWatch"];
    _arrayOfWeaponItems = ["acc_pointer_IR", "optic_LRPS", "srifle_LRR_SOS_F"];
    
    
    removeAllWeapons _unit;
    removeAllAssignedItems _unit;
    removeAllContainers _unit;
    removeUniform _unit;    
    removeVest _unit;   
    removeBackpack _unit;  
    
    
    _unit addUniform "U_B_GhillieSuit";
    _unit addVest "V_PlateCarrierH_CTRG";   
    _unit addBackpack "B_TacticalPack_mcamo";   
    _unit addGoggles "G_Shades_Black";  
    
    
    _unit addWeapon "srifle_LRR_SOS_F" ;
    _unit addWeapon "hgun_P07_F";
    _unit addWeapon "Rangefinder";
    
    
    _unit addMagazines ["7Rnd_408_Mag", 20];
    _unit addMagazines ["16Rnd_9x21_Mag", 3];
    {
       _unit addItem _x;
       _unit assignItem _x;
    } forEach _arrayOfItems;
    
    
    {
       _unit addPrimaryWeaponItem _x;
    } forEach _arrayOfWeaponItems;
    
    
    _unit addItem "optic_Nightstalker";
    _unit addItem "FirstAidKit";   
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "NVGoggles";
    }
    else if (typeOf _unit == "B_Spotter_F") then { 
    _arrayOfItems = ["NVGoggles", "ItemCompass", "itemGPS", "itemMap", "itemRadio", "itemWatch"];
    _arrayOfWeaponItems = ["acc_pointer_IR", "optic_Nightstalker", "muzzle_snds_B", "srifle_EBR_F"];
    
    
    removeAllWeapons _unit;
    removeAllAssignedItems _unit;
    removeAllContainers _unit;
    removeUniform _unit;    
    removeVest _unit;   
    removeBackpack _unit;  
    
    
    _unit addUniform "U_B_CombatUniform_mcam";
    _unit addVest "V_PlateCarrierH_CTRG";   
    _unit addBackpack "B_TacticalPack_mcamo";   
    _unit addHeadgear "H_Booniehat_mcamo";   
    _unit addGoggles "G_Shades_Black";  
    
    
    _unit addWeapon "srifle_EBR_F" ;
    _unit addWeapon "hgun_P07_F";
    _unit addWeapon "Binocular";
    
    
    _unit addMagazines ["20Rnd_762x51_Mag", 20];
    _unit addMagazines ["16Rnd_9x21_Mag", 3];
    _unit addMagazines ["DemoCharge_Remote_Mag", 4];
    {
       _unit addItem _x;
       _unit assignItem _x;
    } forEach _arrayOfItems;
    
    
    {
       _unit addPrimaryWeaponItem _x;
    } forEach _arrayOfWeaponItems;
    
    
    _unit addItem "FirstAidKit";   
    _unit addItem "optic_DMS";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    };  
    

    Thanks JS

    ---------- Post added at 21:52 ---------- Previous post was at 21:30 ----------

    Hi Killzone,

    I have tried your code and it seems to sort of work. When I made the player(me) the sniper, I got the right kit but the AI did not. When I made the player(me) the spotter, I got the right kit but the AI did not.

    Weird, can you not define what AI units have?

    T


  5. HI JS,

    What follows is the content of the loadout.sqf. Neither soldier gets any of this equipment;

    _unit = (_this select 0); 
    
    
    if (typeOf _unit == "B_Sniper_F") then { 
    
    
    _arrayOfItems = ["ItemCompass", "itemGPS", "itemMap", "itemRadio", "itemWatch"];
    _arrayOfWeaponItems = ["acc_pointer_IR", "optic_LRPS", "srifle_LRR_SOS_F"];
    
    
    removeAllWeapons _unit;
    removeAllAssignedItems _unit;
    removeAllContainers _unit;
    removeUniform _unit;    
    removeVest _unit;   
    removeBackpack _unit;  
    
    
    _unit addUniform "U_B_GhillieSuit";
    _unit addVest "V_PlateCarrierH_CTRG";   
    _unit addBackpack "B_TacticalPack_mcamo";   
    _unit addGoggles "G_Shades_Black";  
    
    
    _unit addWeapon "srifle_LRR_SOS_F" ;
    _unit addWeapon "hgun_P07_F";
    _unit addWeapon "Rangefinder";
    
    
    _unit addMagazines ["7Rnd_408_Mag", 20];
    _unit addMagazines ["16Rnd_9x21_Mag", 3];
    {
       _unit addItem _x;
       _unit assignItem _x;
    } forEach _arrayOfItems;
    
    
    {
       _unit addPrimaryWeaponItem _x;
    } forEach _arrayOfWeaponItems;
    
    
    _unit addItem "optic_Nightstalker";
    _unit addItem "FirstAidKit";   
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "NVGoggles";
    
    
    } else {<<<<***This One     if (typeOf _unit == "B_Spotter_F") then { 
    _arrayOfItems = ["NVGoggles", "ItemCompass", "itemGPS", "itemMap", "itemRadio", "itemWatch"];
    _arrayOfWeaponItems = ["acc_pointer_IR", "optic_Nightstalker", "muzzle_snds_B", "srifle_EBR_F"];
    
    
    removeAllWeapons _unit;
    removeAllAssignedItems _unit;
    removeAllContainers _unit;
    removeUniform _unit;    
    removeVest _unit;   
    removeBackpack _unit;  
    
    
    _unit addUniform "U_B_CombatUniform_mcam";
    _unit addVest "V_PlateCarrierH_CTRG";   
    _unit addBackpack "B_TacticalPack_mcamo";   
    _unit addHeadgear "H_Booniehat_mcamo";   
    _unit addGoggles "G_Shades_Black";  
    
    
    _unit addWeapon "srifle_EBR_F" ;
    _unit addWeapon "hgun_P07_F";
    _unit addWeapon "Binocular";
    
    
    _unit addMagazines ["20Rnd_762x51_Mag", 20];
    _unit addMagazines ["16Rnd_9x21_Mag", 3];
    _unit addMagazines ["DemoCharge_Remote_Mag", 4];
    {
       _unit addItem _x;
       _unit assignItem _x;
    } forEach _arrayOfItems;
    
    
    {
       _unit addPrimaryWeaponItem _x;
    } forEach _arrayOfWeaponItems;
    
    
    _unit addItem "FirstAidKit";   
    _unit addItem "optic_DMS";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    }; 
    
    
    };  
    

    Thanks for the help JS

    T


  6. Hi

    I placed in unit's initialization

    bluplagro = group this; this moveInCargo [blu_inshel_1, 3];(nul = [this] execVM "loadout.sqf");

    But it won't accept the entry. It says it is mission a ] or ), can't quite make out which

    also the content of the newly created loadout.sqf

    if (typeOf _unit == "B_Sniper_F") then {sr-loadout.sqf} else if (typeOf _unit == "B_Spotter_F") then {ar-loadout.sqf};

    Thanks JS

    ---------- Post added at 20:12 ---------- Previous post was at 20:06 ----------

    OK, I think we are crossing threads here, you are being helpful and I am being a coding idiot. Let me digest your last expanded script entry and try to work it out

    Sorry about this JS, about being thick I mean

    ---------- Post added at 20:13 ---------- Previous post was at 20:12 ----------

    There are no calls in the init.sqf.

    And what I'm saying for the loadout.sqf (fully exampled, put your loadout scripts in place of):

    _unit = (_this select 0);
    
    if (typeOf _unit == "B_Sniper_F") then {
    
    _unit addUniform "Blah_Classname_Uniform";
    _unit addWeapon "Minigun";
    _unit add etc. etc. etc.
    
    } else if (typeOf _unit == "B_Spotter_F") then {
    
    _unit addUniform "Blah_Classname_Uniform";
    _unit addWeapon "Non_Minigun";
    _unit add etc. etc. etc.
    
    };
    

    Then in each of the unit's init fields put:

    nul = [this] execVM "loadout.sqf";
    

    I think I understand now. Let me try it now

    ---------- Post added at 20:21 ---------- Previous post was at 20:13 ----------

    Is it OK to put the contents of my sr-loadout.sqf as is below;

    _unit = _this;
    
    
    _arrayOfItems = ["ItemCompass", "itemGPS", "itemMap", "itemRadio", "itemWatch"];
    _arrayOfWeaponItems = ["acc_pointer_IR", "optic_LRPS", "srifle_LRR_SOS_F"];
    
    
    removeAllWeapons _unit;
    removeAllAssignedItems _unit;
    removeAllContainers _unit;
    removeUniform _unit;    
    removeVest _unit;   
    removeBackpack _unit;  
    
    
    _unit addUniform "U_B_GhillieSuit";
    _unit addVest "V_PlateCarrierH_CTRG";   
    _unit addBackpack "B_TacticalPack_mcamo";   
    _unit addGoggles "G_Shades_Black";  
    
    
    _unit addWeapon "srifle_LRR_SOS_F" ;
    _unit addWeapon "hgun_P07_F";
    _unit addWeapon "Rangefinder";
    
    
    _unit addMagazines ["7Rnd_408_Mag", 20];
    _unit addMagazines ["16Rnd_9x21_Mag", 3];
    {
       _unit addItem _x;
       _unit assignItem _x;
    } forEach _arrayOfItems;
    
    
    {
       _unit addPrimaryWeaponItem _x;
    } forEach _arrayOfWeaponItems;
    
    
    _unit addItem "optic_Nightstalker";
    _unit addItem "FirstAidKit";   
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "NVGoggles";
    

    Thanks JS

    ---------- Post added at 20:47 ---------- Previous post was at 20:21 ----------

    Hi JS,

    OK, story so far. If I use the first part of your code as below, then it works fine for either classname. However if I put the 'else' if in and the second config, neither get assigned;

    _unit = (_this select 0);
    
    
    if (typeOf _unit == "B_Sniper_F") then {
    _arrayOfItems = ["NVGoggles", "ItemCompass", "itemGPS", "itemMap", "itemRadio", "itemWatch"];
    _arrayOfWeaponItems = ["acc_pointer_IR", "optic_Nightstalker", "muzzle_snds_B", "srifle_EBR_F"];
    
    
    removeAllWeapons _unit;
    removeAllAssignedItems _unit;
    removeAllContainers _unit;
    removeUniform _unit;    
    removeVest _unit;   
    removeBackpack _unit;  
    
    
    _unit addUniform "U_B_CombatUniform_mcam";
    _unit addVest "V_PlateCarrierH_CTRG";   
    _unit addBackpack "B_TacticalPack_mcamo";   
    _unit addHeadgear "H_Booniehat_mcamo";   
    _unit addGoggles "G_Shades_Black";  
    
    
    _unit addWeapon "srifle_EBR_F" ;
    _unit addWeapon "hgun_P07_F";
    _unit addWeapon "Binocular";
    
    
    _unit addMagazines ["20Rnd_762x51_Mag", 20];
    _unit addMagazines ["16Rnd_9x21_Mag", 3];
    _unit addMagazines ["DemoCharge_Remote_Mag", 4];
    {
       _unit addItem _x;
       _unit assignItem _x;
    } forEach _arrayOfItems;
    
    
    {
       _unit addPrimaryWeaponItem _x;
    } forEach _arrayOfWeaponItems;
    
    
    _unit addItem "FirstAidKit";   
    _unit addItem "optic_DMS";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    _unit addItem "FirstAidKit";  
    _unit addItem "FirstAidKit";
    }
    

    Any thoughts?


  7. I tried to make the init.sqf as follows but when the mission loaded I had stock sniper loadout

    call compileFinal preprocessFileLineNumbers "FAR_revive\FAR_revive_init.sqf";
    [] execVM "outlw_magRepack\MagRepack_init.sqf";
    
    
    if (typeOf _unit == "B_Sniper_F") then {sr-loadout.sqf} else if (typeOf _unit == "B_Spotter_F") then {ar-loadout.sqf};

    Not sure where to head from here. I tried putting your code into the INITIAL of the unit and added the loadout.sqf in place and it errored with no information and would not accept the entry

    Hope you can help me JS :)

    ---------- Post added at 19:58 ---------- Previous post was at 19:56 ----------

    Understood, I shall try that now. Thanks JS


  8. I am using the following code in the init..sqf

    call compileFinal preprocessFileLineNumbers "FAR_revive\FAR_revive_init.sqf";
    [] execVM "outlw_magRepack\MagRepack_init.sqf";
    
    
    waitUntil {!isNull player};
    _script = player execVM "sr-loadout.sqf";
    waitUntil {scriptDone _script};
    
    
    

    With this code in mind, is there anyway that I can set the player's loadout by name. I have a 2 Player mission and I want one to have a custom Sniper = (Player_1) Loadout = (sr-loadout.sqf) and the other to have Spotter = (Player_2) Loadout = (ar-loadout.sqf). I have the two files sqf files containing the kit required but I am not sure how to implement it via the init.sqf file

    Any assistance would be appreciated

    Thanks


  9. Hi

    I want to spawn a Fire Team, Team Leader, Rifleman, Grenadier & Auto-Rifleman, they will all be in a group named say 'OPF_Team_1'. The complication comes when I want to name the Team Leader say 'opf_patrol_1a;, Rifleman as 'opf_patrol_1b' etc etc.

    [color=#333333][font=arial]_opf[/font][/color]_team_1[color=#333333][font=arial] = [getmarkerpos "mygroupstart", EAST, ["O_officer_F"],[],[],[],[],[][/font][/color][color=#333333][font=arial]***,180] call BIS_fnc_spawnGroup;[/font][/color]

    This code allows the group creation and group name, but it is the naming of the individuals I need to find out how to do/

    Any clearer?


  10. Hi

    I am using this code, or a variant of it, I can see where you specify the classname of the unit you wish to spawn but is there a way to name the individual unit(s) spawned?

    [color=#333333][font=arial]_mygroup = [getmarkerpos "mygroupstart", EAST, ["O_officer_F"],[],[],[],[],[][/font][/color][color=#333333][font=arial]***,180] call BIS_fnc_spawnGroup;[/font][/color]

    Any help appreciated


  11. I was thinking about using the doMove command and get any remaining enemy AI from the group to move to the target location. If I create a trigger, is there a setup in the trigger options that will capture the an enemy reacting to coming under fire? Bearing in mind that I am sniping them from about 800 to 1,000 meters away??

    Thanks

    ---------- Post added at 22:23 ---------- Previous post was at 21:43 ----------

    Thank you all

×