OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Trigger_Happy on 26 Feb 2005, 22:26:04

Title: Add mg to vehicle
Post by: Trigger_Happy on 26 Feb 2005, 22:26:04
im trying to add a mg to a vehicle through the action menu... everything works but when i click the action it doesnt do anything:

_unit addweapon "Browning"
_unit addmagazine "Browning"

am i writing the script wrong?
Title: Re:Add mg to vehicle
Post by: Cap on 26 Feb 2005, 22:28:53
try

_unit addweaponcargo ["browning", 1]

_unit addmagazinecargo ["browning", 10]

Title: Re:Add mg to vehicle
Post by: Trigger_Happy on 26 Feb 2005, 22:37:42
still get the action, but when i click it nothing happens. thanks for the reply tho  ;D
Title: Re:Add mg to vehicle
Post by: Cap on 26 Feb 2005, 22:42:03
hmmm you are trying to add a mounted machinegun to a vehicle what vehicle are you doing this for
Title: Re:Add mg to vehicle
Post by: Trigger_Happy on 26 Feb 2005, 23:10:56
cessna...lol
Title: Re:Add mg to vehicle
Post by: Triggerhappy on 26 Feb 2005, 23:51:07
no matter what you add, it isn't gonna show up on the model when you add it.
can you get in the vehicle and be a gunner?

BTW: name stealer!  ::) :P ;D
Title: Re:Add mg to vehicle
Post by: Trigger_Happy on 27 Feb 2005, 00:00:28
no cant be gunner...so how can i do this then?
Title: Re:Add mg to vehicle
Post by: Planck on 27 Feb 2005, 00:41:47
The only way to add a weapon to a vehicle is to edit the p3d model for that vehicle.

Basically you need to add a proxy for the weapon and then add the relevant bits to the config.cpp for that model.


Planck
Title: Re:Add mg to vehicle
Post by: Raptorsaurus on 27 Feb 2005, 01:59:50
WADI made a script that allows you to put a MG on any vehicle, but it would look pretty funny on a cesna. ;D

Anyway, here is a link to the script in the editor depot:

http://www.ofpec.com/editors/browse.php?browsewhat=2&category=2_3 (http://www.ofpec.com/editors/browse.php?browsewhat=2&category=2_3)

I actually tested it on a Cesna just to goof around.  Be carefull where on the Cesna you position the MG, if it is in a place where the plane is potentially beteen the MG line of fire and the enemy the MG guy will shoot the plane down while trying to shoot the enemey ;D
Title: Re:Add mg to vehicle
Post by: Trigger_Happy on 27 Feb 2005, 02:11:33
i dont mean pysically putting the mg on it... i mean putting the mg gun inside it like putting hellfires on a apache