![]() |
#1
|
|||
|
|||
![]()
Its possible to build a script to limit fuel for a type of plane? Or better: for plane and respawn in airfiled?
Thanks for any help ![]() Last edited by 28_Condor; 05-21-2012 at 02:45 AM. |
#2
|
|||
|
|||
![]()
Fuel limit on spawning
Code:
public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex) { base.OnPlaceEnter(player, actor, placeIndex); AiAircraft aircraft = actor as AiAircraft; if (aircraft != null) { double FuelLimit = 100; // max kg's of fuel allowed double f = aircraft.getParameter(part.ParameterTypes.S_FuelReserve, -1); // kg's of fuel in aircraft if (f > FuelLimit) // too much fuel { aircraft.Destroy(); // too much fuel so destroy plane } } }
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash. Get the latest COD Team Fusion patch info HERE Last edited by salmo; 05-21-2012 at 06:23 AM. |
#3
|
|||
|
|||
![]()
Thanks, Salmo!
Where I can specify the type of plane? Sorry, I'm newbie with scripts... I want a limit only for BFs... like in one airfield 100%, in another 20% Last edited by 28_Condor; 05-21-2012 at 08:12 PM. |
![]() |
|
|