Jump to content
Sign in to follow this  
mecharius

Script to get artillery fire mode

Recommended Posts

My community have developed / adapted existing tools to allow us to call in artillery "manually" without using the point and click artillery computer. The last piece of the puzzle is determining what mode the weapon is in without cycling through the modes (pressing the F button). I've tried a bunch of different weapon / muzzle / magazine functions but none seem to return me the fire mode (i.e. represented by the "TRV" value in the gun camera).

Does anybody know a scripted way to determine the fire mode of an indirect fire gun?

(We currently do this by pointing at something about 1km away and cycling through the F modes until the red "X" goes away)

Share this post


Link to post
Share on other sites

the command currentWeaponMode will return a string-name of the current mode, in the case of the Mk6, it will return 'Single1', 2 & 3 - representing the selected range, which is modified by 'artilleryCharge' in the weapon's firemode config (scale of 0-1, 1 being full charge).

I'm not sure yet about getting the actual 'trv' value outside of the artillery computer (just time?). Also check out these commands: getArtilleryETA, inRangeOfArtillery and getArtilleryComputerSettings (returns mode, ammo type, and a third i am assuming is detonation height (all 0 except flare, which is 240...); works even if artilleryComputer is disabled)

Edited by dr_strangepete
moar

Share this post


Link to post
Share on other sites

currentWeaponMode works ok but is not very descriptive, but

getArtilleryComputerSettings select 0

does the trick. Thanks!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×