OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: greg147 on 29 Jan 2005, 15:44:31

Title: Tank using MG only?
Post by: greg147 on 29 Jan 2005, 15:44:31
I imagine this may have been asked before, but I couldn't find it (I spent about 30 mins skimming through the forums and the serch menu  ;) )

Is there a way to make a tank only use its MG? Like, remove the SABOT shells or something?

If so, then is it possible to use the same technique on choppers or planes?

Thanks  ;)
Title: Re:Tank using MG only?
Post by: Pilot on 29 Jan 2005, 16:06:05
You could try something like this:

Put this in the tank's init field:

Code: [Select]
this removemagazines "shell73"; this removemagazines "heat73"; this removemagazines "gun73";
Not too sure if this will work, I'm just throwing a suggestion out there.  Also, if you look in the comref, you will notice several different calibers? of shell, heat, and gun:
Code: [Select]
Shell73  
Heat73  
Gun73  
Shell105  
Heat105  
Gun105  
Shell120  
Heat120  
Gun120  
Shell125  
Heat125  
Gun125


You may have te experiment with one of these values to eliminate the shells.
Title: Re:Tank using MG only?
Post by: greg147 on 29 Jan 2005, 16:13:47
Ah, thanks. I'll try that, see if it works.  8)

Failing that, would setting ammo 0 then putting
Code: [Select]
this addweapon 'browning'; this addmagazine 'browning'work?  ;)

I'm not sure if its the right code, but theres a way to add browning .50 bullets to a MG, so it should work on tanks  :P
Title: Re:Tank using MG only?
Post by: Pilot on 29 Jan 2005, 17:56:30
Yeah, that might work.  I'm not sure if the magazine is Browning or MGun or some other name.  You shouldn't have to put addweapon in the init field, as you never deleted the original weapon, but I could be wrong.  Experiment and see what works.
Title: Re:Tank using MG only?
Post by: Dubieman on 29 Jan 2005, 18:35:49
Their are lots of ways to do it,

Just for tanks their machine guns are usually

MachineGun12_7
MachineGun7_62

I'm pretty sure the abrams and T80 use the 12_7. Not sure if the other gun code works. :P

Try a weapon listing in the ed depot I suppose.

I'd prolly remove all weapons first then add the machine gun next, but soo many ways to do it. ::) :P