OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: pazuzu on 24 Sep 2004, 01:59:32

Title: Rearming from LST
Post by: pazuzu on 24 Sep 2004, 01:59:32
Hi, I'm making a mission with a Jetpack addon & I want to make it easy to get support for the Jetpack. The Jetpack runs out of fuel in about 5 min so a nearby fuel source is a must. So what I did was place an LST & trigger over it to setfuel 1 & setdammage 0. This takes care of the fuel & repair but I dont know how to rearm jetpack from trigger...I couldn't find a command in the Command reference.

Is it possible to rearm vehicle from a trigger?
Title: Re:Rearming from LST
Post by: Peter_Bullet on 24 Sep 2004, 14:11:37
Yapp! Use command: UnitName removeMagazine "weaponClassName"; UnitName addMagazine "weaponClassName"

Where unit name is ofcourse the name of the unit and WeaponClassName is the weapon class name.

like: F16 removeMagazine "Epl_Aim9_6"; F16 addMagazine "Epl_Aim9_6";

You'll easily find out the class name if you've been to addon making. If not ask the author of the addon or see the readme.

This command removes the old ammunition first, so you don't get multiple magazines... ;)

I hope you understand! ;)