Jump to content
Sign in to follow this  
styxx42

equiping players at mission start.

Recommended Posts

I used to use a Sqs back in the OPF days.

Doesnt' seem to work,

I found a couple missions that use this in the init.sqf

_preset = p2 execVM "gear\ACE2OA_Operator_USPSD_M4A3_RCO_GL_EP1_LOAD.sqf";

And in the Gear folder I found this.

hint "Your PXS Preset Kit Is Being Loaded, Stand By...";
removebackpack _this; 
removeAllWeapons _this;
removeAllItems _this;
_this setVariable ["ace_sys_wounds_no_medical_gear", true];
///////////////////////// 
_this addWeapon "ItemMap";
_this addWeapon "ItemCompass";
_this addWeapon "ItemWatch";
_this addWeapon "ItemRadio";
_this addWeapon "ACE_DAGR"; 
_this addWeapon "NVGoggles";
_this addweapon "Binocular_Vector"; 
_this addWeapon "ACE_GlassesLHD_glasses"; 
_this addWeapon "ACE_GlassesTactical"; 
_this addweapon "ACE_GlassesGasMask_US"; 
_this addWeapon "ACE_Earplugs";
/////////////////////////////////////    
{_this addmagazine "30Rnd_556x45_Stanag"} forEach [1,2,3,4,5,6];
_this addweapon "ACE_SOC_M4A1_Aim";
/////////////////////////////////////     
{_this addmagazine "ACE_12Rnd_45ACP_USPSD"} forEach [1,2,3,4,5,6,7,8];
_this addweapon "ACE_USPSD"; 
/////////////////////////////////////
{_this addmagazine "MAAWS_HEAT"} forEach [1,2];   
{_this addmagazine "ACE_Battery_Rangefinder"} forEach [1];
/////////////////////////////////////     
_this addweapon "ACE_CharliePack";

//sleep 0.1;  // ********************************** 

ok = [_this, "ACE_Morphine", 4] call ACE_fnc_PackMagazine; 
ok = [_this, "ACE_Bandage", 4] call ACE_fnc_PackMagazine; 
ok = [_this, "30Rnd_556x45_Stanag", 7] call ACE_fnc_PackMagazine;
ok = [_this, "ACE_Battery_Rangefinder", 1] call ACE_fnc_PackMagazine; 
ok = [_this, "ACE_Knicklicht_IR", 1] call ACE_fnc_PackMagazine; 
ok = [_this, "MAAWS_HEAT", 1] call ACE_fnc_PackMagazine; 
ok = [_this, "ACE_12Rnd_45ACP_USPSD", 4] call ACE_fnc_PackMagazine; 
ok = [_this, "ACE_KeyCuffs", 3] call ACE_fnc_PackWeapon; 
ok = [_this, "HandGrenade_West", 2] call ACE_fnc_PackMagazine; 
ok = [_this, "SmokeShell", 2] call ACE_fnc_PackMagazine; 
ok = [_this, "IR_Strobe_Marker", 1] call ACE_fnc_PackMagazine;
/////////////////////////////////////    
[_this, "MAAWS"] call ACE_fnc_PutWeaponOnBack;

hint "PXS Preset Kit Successfully Loaded";

But I try and steal it so i can just load up my squad in any mission by changing their names to p1(or what ever)

I get an error when I launch when that player is not actually in the game.

So I can't pbo the mission and host on my dedicated server.

is there an easy way to launch my kit script by player name and not have it error even if the player is not present?

Not a scripter, totally ripping off better people then myself. But I am trying to learn.

Thanks

I am tired of having to edit each players init line for EVERY mission I edit for my squad to play

In a perfect world, I would drop in the Gear Folder with the scripts in them in the mission folder.

And paste my couple lines in the init.sqf that would call said scripts based on player name and if the player entered the NAMED soldier he would be equipped as he normally is. If he didn't show that night we could continue on and not worry about it.

Share this post


Link to post
Share on other sites

Look or search for the "assign gear" script. I don't know if it's by Galzohar or if it's part of some other script( might be F2 framework), but it does exactly what you need..

Share this post


Link to post
Share on other sites

Thanks I tried Equipment, equip. Loadout.

Antigoon and Demonized

I appreciate you taking the time to reply.

Share this post


Link to post
Share on other sites
i updated an older script of mine if you are interested.

http://forums.bistudio.com/showthread.php?p=1883671#post1883671

I almost spit my morning coffee out when I was browsing Armaholics this morning as I was gearing up to do some editing reading and try and figure out what you had said above about the unique ID.

Too kind. I really appreciate this.

And you went the extra and put it in a mission.

Awesome.

:yay:

Share this post


Link to post
Share on other sites

Hey Styxx42, did you find that kit load out in one of the ACE2 versions of the Lightspeed's Ghost Recon Island Thunder missions? PXS is short for Phoenix Soldiers.

Please feel free to use the gear script as a template for equipping soldiers in your missions. Always use the following lines in the gear script to clear everything from the soldier, before equipping.

removebackpack _this;

removeAllWeapons _this;

removeAllItems _this;

_this setVariable ["ace_sys_wounds_no_medical_gear", true];

Just remember, the below portion of the gear script is specifically for use with ACE2 backpacks.

ok = [_this, "ACE_Morphine", 4] call ACE_fnc_PackMagazine;

ok = [_this, "ACE_Bandage", 4] call ACE_fnc_PackMagazine;

ok = [_this, "30Rnd_556x45_Stanag", 7] call ACE_fnc_PackMagazine;

ok = [_this, "ACE_Battery_Rangefinder", 1] call ACE_fnc_PackMagazine;

ok = [_this, "ACE_Knicklicht_IR", 1] call ACE_fnc_PackMagazine;

ok = [_this, "MAAWS_HEAT", 1] call ACE_fnc_PackMagazine;

ok = [_this, "ACE_12Rnd_45ACP_USPSD", 4] call ACE_fnc_PackMagazine;

ok = [_this, "ACE_KeyCuffs", 3] call ACE_fnc_PackWeapon;

ok = [_this, "HandGrenade_West", 2] call ACE_fnc_PackMagazine;

ok = [_this, "SmokeShell", 2] call ACE_fnc_PackMagazine;

ok = [_this, "IR_Strobe_Marker", 1] call ACE_fnc_PackMagazine;

silent_op

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×