MeerCaT Posted November 4, 2017 Posted November 4, 2017 (edited) (v1.5.7.10872) Hi all. Feels like this one is probably a very simple one, but I must be having a 'mental moment' because I'm just not 'seeing it' right now... How can we configure/script/instruct our AI helicopter friends to play "sleeping lions", "sit and be good" or do their best impression of a rock? What I mean is, start off and remain sat on the ground (or official airport/FARP parking) and work like a politician and do nothing at all of any benefit to anyone...ever! :) (Sorry, let me just slide this soap box out of the way) How can we spawn a helicopter group/unit on the ground somewhere and have it sat there nice and quiet doing nothing? The waypoint 'Types' available can be categorised as either 1) 'Be in the air flying already',or 2) 'Be on the ground initiating a startup/takeoff procedure'. Sure there's the 'static object' option but that doesn't then allow for any 'usage' of that unit at a later point in time. One obvious option is of course to start them off cold on the ground and turn off 'AI' for that group/unit using a trigger before they have chance to start flicking any switches and playing with their knobs: Place a new AI helicopter group on the map in the desired location Name (a.k.a. "Group"): MyNewShark Type: Ka-50 Pilot (a.k.a. "Unit"): MyNewSharkPilot [*]Create a new trigger Type: ONCE New Action: Type: GROUP AI OFF Group: MyNewSha...wait a minute! Why isn't it in the list?!?! Ok fine let's try the 'Unit' (Pilot) approach instead... Type: UNIT AI OFF Unit: MyNewSha...hmm really?! Not here either. Aha! I have an idea: Type: GROUP STOP Unit: MyNewSha...ok scratch that. Strangely (it's strange to me at least) MyNewShark and MyNewSharkPilot do appear in the available Group and Unit list for the GROUP ACTIVATE/DEACTIVATE and UNIT ACTIVATE/DEACTIVATE actions, respectively. It's not clear to me what the significance or meaning of this is. I can 'activate/deactive' my group/unit but I can't turn on/off its AI? How are actions these so fundamentally different such that one should be available for a unit and the other not? Please do come and take pleasure in pushing my face into a big fat custard pie that is "The Obvious Answer". I look forward to its sweet and familiar taste Cheers all. Edited November 4, 2017 by MeerCaT typo
feefifofum Posted November 4, 2017 Posted November 4, 2017 Takeoff from ramp. Check "uncontrolled." ;) This one only works for "official" parking spots as you put it. Static objects may also be accessed by UNIT level triggers, if you need to check if something on normal ground is damaged or destroyed. THE GEORGIAN WAR - OFFICIAL F-15C DLC
MeerCaT Posted November 4, 2017 Author Posted November 4, 2017 Thanks. I've just tested it and yes it does seem to accomplish the desired effect. It's a little restrictive though, being only available from the 'ramp' position and, more importantly for my purposes, doesn't allow the player to 'take control' of the unit until 'ACTIVATING' it first - at which point it executes its "Takeoff from ramp" waypoint instruction. (Being available only in such a specific circumstance, I am curious what the intended use/purpose is of this 'UNCONTROLLED' feature? ) One purpose I have in mind for having units (helicopters) sat idle on the ground is to serve as a visible 'pool' of aircraft that the player can take control of at will and 'hot-swap' between them. I'm not seeing any way that 'UNCONTROLLED' could play a part in achieving this. We can 'ACTIVATE' via script, which seems to negate/remove the 'UNCONTROLLED' attribute on the unit, but I don't think we can ever get it back into that uncontrolled state again, can we? And regarding the player taking control, that's not possible through script either is it? (Related to this, but a separate question for another thread and day, is what to do with the aircraft we have just swapped out of when doing this 'hot-swap'?) I'm kind of just thinking this stuff out loud, but any suggestions welcome. Cheers.
feefifofum Posted November 4, 2017 Posted November 4, 2017 (edited) It offers several advantages for AI for mission design. To start with, you will not have to spawn a late-activated object into the game world in real time; this is known to cause lag in some cases even on high-end systems. It also offers a more realistic approach to attacking an enemy airbase, as an example. If an "uncontrolled" unit is damaged or destroyed, it will not move when activated via an AI TASK PUSH trigger, allowing you to a) see hostile resources and b) prevent them from becoming a factor. Your "visible pool" of player aircraft idea is a little outside of the scope of what this was intended for; is there something wrong with the "select aircraft" screen for this purpose? This will show a list of every flyable aircraft in the mission as defined by the mission creator. To answer your other question, once you leave an AI unit, I believe it will simply RTB and land on its own. I don't think there's a way to have it continue its mission. Last I checked, you are able to take back control as the unit RTBs if desired. Edited November 4, 2017 by feefifofum THE GEORGIAN WAR - OFFICIAL F-15C DLC
MeerCaT Posted November 4, 2017 Author Posted November 4, 2017 Thank you for the info; everyday is a lesson :) I think you're right, "uncontrolled" probably isn't quite the right tool to be involved in this job. What I'm probably looking for, in an idea world, is simply a 'shutdown' command that could be issued to an AI aircraft. Oh how we all dream of these 'ideal worlds'! :) Sure the aircraft selection mechanism (when aircraft have been configured as being a "client") is at least a fall back option, but again it doesn't quite hit the mark. For example, these aircraft don't exist in world until having 'selected' them to fly with. And of course the 'old' aircraft disappears. Also it may not always be desirable to have all aircraft available to the player when initially entering the mission. I'll keep looking into options for achieving some vague approximation of the desired effect. Compromise is the order of the day :)
feefifofum Posted November 5, 2017 Posted November 5, 2017 Good luck. :) THE GEORGIAN WAR - OFFICIAL F-15C DLC
Recommended Posts