Forum Jump :

Author Message


Posts: 16
Rank:


Level: Member

Country: uk
Location:
Occupation:
Age: 47
In-game name:

 
#97347 Posted at 2011-01-26 20:10        
     
I have been messing with this forever! The mortar is a very confusing beast.
The ARTY_ WP and HE rounds will work but upset the artillery computer so you can only fire them long range.

8Rnd_81mmHE_M252
8Rnd_81mmWP_M252
The following codes work with the above ammo 'as is':
this setVehicleAmmo 0.0; this addMagazine "8Rnd_81mmWP_M252";
or for multiple magazines:
this setVehicleAmmo 0.0; {this addmagazine "8Rnd_81mmWP_M252"} forEach [1,2,3,4];

For the flares I think you need to synchronise an artillery module (F7 in the Editor) with the mortar to get them to work.
Without the module the mortar will fire the rounds but they will not produce a flare.

8Rnd_81mmILLUM_M252

AI sometimes get upset with the different magazines and refuse to fire - it's something to do with the Artillery computer. Also I have noticed if another AI laser designates a target the Artillery computer will not let you or AI fire mortars near the designated target.

Added 6 hours 31 minutes later:

For the flares I think you need to synchronise an artillery module (F7 in the Editor) with the mortar to get them to work.
Without the module the mortar will fire the rounds but they will not produce a flare.

Forget that - just tested it. The only time I have ever seen a flare appear with a mortar was when I was testing the Sam_support addon that you can download on this site. I went to the mortar crew and shot one. I was then able to fire flares from the mortar (it had a module) but how it's done I don't know. Will investigate further - it's probably scripting with a creatVehicle.

Added 6 hours 4 minutes later:

No luck - there is some complex scripting in SAM_Support and I can't find any references for it. The following all work in triggers for me tho. 150m - the flare will fall burning for 150m. If you set that to 200 it will go out 50m above the ground.
testflare = "F_40mm_White" createVehicle [getPos marker1 select 0, getPos marker1 select 1,150];
testflare = "F_40mm_White" createVehicle (player modelToWorld [0,0,150]);
testflare = "F_40mm_White" createVehicle (marker2 modelToWorld [0,0,150]);

This post was edited by PELHAM (2011-01-27 08:46, ago)