![]() |
Refuel Scripting research
Hi guys, So the other day i decided to look into RRR Refuel, rearm and Repair.
I think this is looking more possible I have located some details about the plane and Fuel. So I will need some help with working this into script soon I think as I am a little busy with stupid work....I love my work and pays well but is restrictis my flying time :D OK so what do I know or what have I found??? Well lets look at two areas. First the SpitfireMKI Flight model details Second the aircraft details on the object aircraft Spitfire Mk.I Flightmodel //below is the start settings for the plane on spawn "Pneumatics". We could call this up to simulate refuel. Would reset the plane to spawn status but change the 'Empty' to 'Full' Pneumatics Source Engine0 Pressure 300 lbsqin PrimaryContainer 4 litre Starts Open, Full SecondaryContainer 4 litre Starts Closed, Empty Below Using this we should be able to assign a fuel % which is usually done when you are in Loadout and slide the fuel bar from 0-100% WPF.Fuel [%]: Fuel [%]: WPF.Fuel weight [kg]: So the call in the .cs file could be something like. if [SpitfireMkI] types Aircraft Stationary class part.SpitfireMkI type Fighter FM FlightModels.SpitfireMkI Pneumatics Source Engine0 Pressure 300 lbsqin PrimaryContainer 4 litre Starts Open, Full SecondaryContainer 4 litre Starts Closed, Full or WPF.Fuel [85%]: I think we are getting a little closer. Any assistance on this? |
This sounds promising !!!
While we are on this topic, couldn't we have engines pre-warmed by script upon spawn in ? (i.e. OnPlaceEnter - When a player plane has been created, set the temps for each engine/oil to 150/60. Then we would not have to wait 3 minutes on the Allied side just to start moving.) WildWillie |
Quote:
|
The only problem I see with doing this (as the game is currently) is you're only going to refuel/re-arm while on the ground (I know that part is obvious). So you're either going to land/return to base to do it.
Since we don't have the refly button of old, the despawn scripts are used to get rid of landed planes. So the second someone comes in for a landing the timer for that plane's destruction has been started. Without the old style system of 46 (refly button available only after bail out / landed / crashed / killed) you'll run into planes building up where ever landing zones are. This is assuming 1/2 the people actually use the refuel/rearm option where as the crash landed planes will be piling up as well. I just don't see how this would work without a significant modification to the despawn scripts (or HINT HINT HINT - Devs make it like 46!!!) |
Quote:
How do you go about this ? When setting up a spawn point I only see options "Spawn parked" and "parachute" Am I missing something here ? WildWillie |
Quote:
Of if you want it in a script use this: string BPSpawnParked = "1"; // whether to give birth to spawn parked aircraft 1 - yes, 0 - or string BPSpawnScramble = "1"; |
Quote:
What I am talking about is how to have a planes engines already warmed when a player creates a new one. So a player joins a server, selects the army (flag) then clicks on the spawn base. It offers them a list of planes available, they select a plane, loadout options if available, then click "Create" How would you have that plane ready to go ? WildWillie |
Interesting, perhaps the pre-spawned planes are a better way to go. Introduce set numbers of each type, which might make players need to fly more realistically.
|
Atag I use a modified despawn script where I despawn aircraft after a time period and or at end of flight path which ever come first. The time period (typ 45~60mins), tuneable for each mission set, starts count down went spawning in rather than at end. The at end is controlled by end of path.
The advantage is ability to control more than one bomber, ie take a flight of bombers to target, do several runs(taking control of each plane in flight) then fly group(lead plane) home. I set time out so to be typical longer than this would take. The despawner function checks for player in group and so bypases if player still in use. Planes on the deck despawn after time now. So this despawner version would accept RRR type concepts quite well and still clear Ai clutter. |
Interesting Smokeynz. Have you tested your version in the dedicated server environment? I didn't think the ability to check if human controlled / AI controlled was working correctly. What we need is the ability to keep humans in a plane (can't exit with escape) unless the pilot has bailed, crashed, landed, or died.
Also, depending on the spawn point (since there's soo many bad one's at airfields) sometimes a spawned in plane might do a little bounce and there will be a chat message saying "player X has landed / returned to base, etc..," starting the despawning prematurely. Can you share what you use to despawn with? |
All times are GMT. The time now is 09:04 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.