OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Arkon on 29 Mar 2007, 14:51:32

Title: How to make a tank fire its main gun
Post by: Arkon on 29 Mar 2007, 14:51:32
Hi,

Tried allsorts to get a tank to fire its main gun at the player or buildings without using invisble targets.
Any ideas anyone?
A working example for a T72 would be handy  :)

Arkon
Title: Re: How to make a tank fire its main gun
Post by: Speeder on 31 Mar 2007, 12:54:10
I'd like to know this too please
Title: Re: How to make a tank fire its main gun
Post by: Arkon on 31 Mar 2007, 15:20:34

Hi Speeder

So far Iv'e found this to sort of work for a T72

_tank dowatch player

~3

_tank fire "D81"

Where _tank is the name given to your tank.

But, getting it to fire imediately or in the right direction is summint else, tried:

_tank reveal player ; _tank dowatch player ; _tank doTarget player

with mixed results cos the tank seems to have to think about it before it points its gun at
the target and before it fires... also the damage it does to buildings seems minimal.

Arkon



Title: Re: How to make a tank fire its main gun
Post by: Speeder on 31 Mar 2007, 20:52:09
thanks mate. sounds great.
Title: Re: How to make a tank fire its main gun
Post by: Yakuzi on 02 Apr 2007, 13:37:35
Also, if you want the T72 to use HE rounds add in the init field (or before the actual fire command):

Code: [Select]
_tank removemagazines "23Rnd_125mmSABOT_T72"

I tried to make the tank switch magazines with the following action commands, but couldn't get it to work:

Code: [Select]
_tank action ["LOADMAGAZINE", <target>, <magazine creator>, <magazine id>, <weapon name>, <muzzle name>]

_tack action ["USEMAGAZINE", <target>, <magazine creator>, <magazine id>]

I always end up with one element short...   :confused: Anyone know how these particular action functions work?

Cheers