Jump to content
Sign in to follow this  
dufalator

How do I assign different weapons in mission editor?

Recommended Posts

Hello,

I have been playing around in the mission editor. I have created a team of frogmen for a night time mission. I want to equip my player with "Night vision goggles" and a sniper rifle. How do you assign specific equipment to individual soldiers in mission editor?

Thanks

Share this post


Link to post
Share on other sites

Use the addItem command to add the NVGs to the player character's inventory, then the assignItem command to equip them. For the weapon, use addMagazines followed by addWeapon (this order ensures that one of the magazines is loaded into the weapon) and then addPrimaryWeaponItem to equip attachments (addHandgunItem is for sidearms, so far just "muzzle_snds_l"). Note that if a desired weapon has a weapon+attachments combo with its own classname, you may use that instead with addWeapon, allowing you to omit addPrimaryWeaponItem or addHandgunItem (both the P07 and Rook-40 have already-suppressed classnames).

Share this post


Link to post
Share on other sites

orrr if you watched the livestreams... you will notice that the units page has an EQUIPMENT tab in the beta so just wait for 25th

Share this post


Link to post
Share on other sites

Is the Beta coming out on the 25th?

---------- Post added at 19:31 ---------- Previous post was at 19:31 ----------

Is the Beta coming out on the 25?

---------- Post added at 19:32 ---------- Previous post was at 19:31 ----------

Where do I find add item and assign item?

Share this post


Link to post
Share on other sites
Is the Beta coming out on the 25th?

Yes, at least that's the schedule.

Where do I find add item and assign item?

They're scripting commands. You can write them into the box in the unit's settings that reads "INITIALIZATION". Something you can copy-paste there:

[url=https://community.bistudio.com/wiki/removeAllWeapons]removeAllWeapons[/url] this;
this [url=https://community.bistudio.com/wiki/addItem]addItem[/url] "NVGoggles";
this [url=https://community.bistudio.com/wiki/assignItem]assignItem[/url] "NVGoggles";
this [url=https://community.bistudio.com/wiki/addMagazine]addMagazine[/url] "7Rnd_408_Mag";
this [url=https://community.bistudio.com/wiki/addWeapon]addWeapon[/url] "srifle_LRR_f";
this [url=https://community.bistudio.com/wiki/addMagazines]addMagazines[/url] ["7Rnd_408_Mag", 7];
this [url=https://community.bistudio.com/wiki/addPrimaryWeaponItem]addPrimaryWeaponItem[/url] "optic_sos";

Please look at the editing board for classnames of other items. This thread probably belongs there in the first place.

Share this post


Link to post
Share on other sites

To add on to what I said about "combo" classnames, there's a pre-made LRR+SOS combo with the classname "srifle_LRR_SOS_f", which can be used in place of "srifle_LRR_F" so that you can leave out the separate line for the scope. Also, you can just use addMagazines (before addWeapon) and enter the total number of magazines, and then one will automatically be loaded into the weapon, saving another line:

removeAllWeapons this;
this addItem "NVGoggles";
this assignItem "NVGoggles";
this addMagazines ["7Rnd_408_Mag", 8];
this addWeapon "srifle_LRR_SOS_f";

Share this post


Link to post
Share on other sites
Also, you can just use addMagazines (before addWeapon) and enter the total number of magazines, and then one will automatically be loaded into the weapon, saving another line

Regular divers have very little inventory space, though. Since if eight magazines is too much (I'm not sure if it is), you "lose" one compared to adding a single one that gets loaded beforehand, and then the rest. But simplicity is a fair point especially since I'm not sure.

Share this post


Link to post
Share on other sites

Admittedly I'd be surprised to find out that a combat diver was able to swim with an anti-materiel rifle... but the OP can experiment with the Editor to find an appropriate number of magazines for whichever rifle is chosen for the player character.

Share this post


Link to post
Share on other sites

has no body seen the equipment tab on the beta??? this will eliminate all needs of scripting loadouts......

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  

×