Comrades in Arms Discussion Board

Full Version: weapons
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all, esp. Bals,

some questions about weapons: when I want to add other weapons to soldiers like in my pro ctfs, is there a way to give them after respawn the same weapon without using a trigger like I do? Or which script command use to rearm (or choose like with space) weapon (allways must press space)?

Why can´t I completely empty an ammo-crate? There are allways M16 /Ak74 and handgranades in. I can´t delete them.
yes Lob there is another way. I used a script for my Nighthawk CTF that defines a soldiers loadout after respawn. I will send you the complete How-To plus script tomorrow.

Hm I wonder why you cant remove all content from a crate as it works great for me here. What command do you use in the init field ?
Hi,
I used removeAllWeapons. On soldiers this is working fine but not at ammo crates. I have tested a lot, but nothing works.
Anyway here is my solution for the crates. Seems like u used the wrong command as it is for units and not crates and vehicles. Here is the right one:
Remove Commands:

To remove all weapons from crate

clearWeaponCargo this

To remove all Magazines

clearMagazineCargo this

Add Commands
To add a weapon

unitname addweaponcargo ["weapontype",amount]

To add magazines

unitname addmagazinecargo ["ammotype",amount]

This way it works :-)
This is great information! Thanks for posting all, it really helps rookies like me out with scripting information. Now if I can only completely edit just one mission! :lol:
Think I will write down some infos I collect when I don´t know how to do and then get answer from others. I also have done a small text-file with weapons and magazines which are even (east - west). This all can in future give a great FAQ. But I should have time for this (ahhh stress).
I have already a huge compendium compiled for my own work. Maybe a map and mission FAQ could be set up by fusioning our knowledge Lob. I will send you my 200 Pages of hand written helps and hints as soon as i got the writing checked :eek: