Jump to content
Sign in to follow this  
GunnDawg09

Make a unit spawn with a diff weapon?

Recommended Posts

How do I spawn in a marksmen with a Mk12 instead of the M21?

---------- Post added at 01:37 AM ---------- Previous post was at 01:19 AM ----------

Anyone? how do I choose which weapon a unit spawns with?

Edited by GunnDawg09

Share this post


Link to post
Share on other sites

I think it would be easier with a proper example, i went a bit crazy reading this thread and not understanding it, so I did some research myself.

This is the script from me modding a DEMOLITIONS EXPERT (Force Recon) for my latest mission, with some stealthy cool kit. It appears if done properly you can put as much stuff as you like onto your men (within reason)! It doesn't show up properly in the gear menu though.

His name in the game is 'test', and he has a G36 silenced/reflex sight, a javelin rocket, and an m9 (silenced) with 3 satchel charges (called pipebomb). Remember to add NV Goggles and Binoculars to anyone you remove all weapons from, and that you need to put removeallweapons <name>; first!!!

the equipment is in italic, the command in bold - the name of the unit is in Red!

removeallweapons test; test addmagazine "javelin"; test addweapon "javelin"; test addweapon "binocular"; test addweapon "NVGoggles"; test addweapon "G36_C_SD_eotech"; test addmagazine "30Rnd_556x45_G36SD"; test addmagazine "30Rnd_556x45_G36SD"; test addmagazine "30Rnd_556x45_G36SD"; test addmagazine "30Rnd_556x45_G36SD"; test addmagazine "30Rnd_556x45_G36SD"; test addmagazine "30Rnd_556x45_G36SD"; test addweapon "M9SD"; test addmagazine "15Rnd_9x19_M9SD"; test addmagazine "15Rnd_9x19_M9SD"; test addmagazine "pipebomb"; test addmagazine "pipebomb"; test addmagazine "15Rnd_9x19_M9SD"; test addmagazine "15Rnd_9x19_M9SD"; test addmagazine "pipebomb";

If you want to try it out, just paste that into your initialization section of your unit's editing page, and call him < test > (just the 4 letters!)

http://forums.bistudio.com/showpost.php?p=1292940&postcount=8

Use that to change weapons to your needs, as kindly provided by Animal Mother above.

I hope seeing it in this context helps! :bounce3:

Edited by stryder88
grammar

Share this post


Link to post
Share on other sites

Use:

{test addmagazine "30Rnd_556x45_G36SD";} forEach [1,2,3,4,5,6];

Instead of copy-pasting the same command 6 times.

You could also use a while loop that runs 6 times.

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  

×