Jump to content
Sign in to follow this  
unhappytroll

Notes on the Xeno's Vehicle Rearm script for n00bs like me

Recommended Posts

Original link: http://www.armaholic.com/page.php?id=19139

Note 1: it works properly only if there is no more vehicles in the trigger. Problem is, that even a simple helipad portable light "PortableHelipadLight_01_red_F"  IS a vehicle. Which means that if it was placed in the trigger, it will be listed in "thislist" variable, and [thislist select 0] in the activation script will do zilch, because your vehicle would not be in first position - hence script will not work for you. So be sure that there is nothing else in the trigger that had been placed by you.

 

Note 2: code

_type = typeOf _object;
_object vehicleChat format ["Servicing %1... Please stand by...", _type];

will give you name of the vehicle in the form of class name, which is like "B_Heli_Light_01_armed_F" and not very informative. But you can do better. Just make it look like:

_type = typeOf _object;
_type_name = getText(configFile >> "CfgVehicles" >> _type >> "displayName");
_object vehicleChat format ["Servicing %1... Please stand by...", _type_name];

and you will have nice "AH-9 Pawnee" name instead.

 

Note 3: you can safely remove code

while {(fuel _object) < 0.99} do {
	_object setFuel ((fuel _object + 0.1) min 1);
	sleep 0.01;
};

And leave just 

_object setFuel 1;

All that it is doing just the slowing the movement of a fuel indicator to it's 100% position. Leave it only if you want it for "immersion" sake, and then tweak sleep and step parameters as you like.

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  

×