Jump to content

Adding Rangefinder functionality to vehicle optic via script?

Recommended Posts

I've been looking via google and here on the forums for any indication that this is doable via scripting. (No luck so far)

I'm attempting to add functionality where the rangefinder display you get in a tank gunner slot appears in slots that normally do not have the functionality.
We use both RHS USAF and ACE3 modpack, and have a rough time attempting to get range to gunner since there is no range finding capability in turret for the commander seat.


I don't care weather or not it has FCS capability of if toggle-able, I just need to know if this is scriptable or does it have to be a configpatch for the rsctext in the vehicle config. I am looking for a solution that is MP Friendly.

Share this post

Link to post
Share on other sites


KUSH_fnc_rangeFinder =
	_location = screenToWorld [0.5,0.5];
	_distance = round(player distance _location);
	_string = "Range: " + str _distance + "m";
	titleText [format["<t color='#00CC00' size='1'font='PuristaBold'>%1</t>",_string], "PLAIN DOWN", -1, true, true]; sleep 3; titleFadeOut 2;

player addAction ["<img size='0.8' color='#DC143C' image='\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\transport_ca.paa' /> <t color='#DC143C'>Laser Rangefinder</t>",KUSH_fnc_rangeFinder,[],99,false,true,"","(vehicle player != player) && (commander vehicle player == player)"];


  • Like 2

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