• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Mission AI tutorial somewhere?

Messages
65
Country
germany
Hi folks,

I'm trying to add AI to my mission. Is there a AI tutorial out there? The SDK is very short for a newbie.

If there is a kind soul out there who would - instead of pointing me to a tutorial - give me some hints directly on the following questions:

1.) I have a Unit_Mode in the AircraftAI that I can set to Taxi, Landing, Zombie, etc. Nevertheless I can set an AircraftAIState (SIMPLE_TAKEOFF, SIMPLE_LANDING, etc.) How do the correspond?

2.) I want a plane to
* pushback
* taxi
* takeoff
Can I change the state in between? Are there Actions to do so?

3.) I added a TaxiAI and a TakeoffAI to my AircraftAI. When in the TakeoffAI the AITakeoffMode was set to Init, my aircraft takes off right from the parking position. But I can't make the aircraft taxi. I have defined waypoints, but it just doesn't move...

I guess I am the zillionth user to ask this, but I didn't find any understandable help, yet.

Tia,
Robin <><
 
Hallo Robin,

only two states will work: takeoff and landing.
You have to assign waypoints for every turn the aircraft shall do. That means you have to define the actual path of the aircraft with altitudes of the waypoints and target speed, even for taxiing.
Use "simple_takeoff" for this.

Pushback is not possible for this. You may want to think about creating a traffic bgl for that flight if the aircraft should behave like a normal AI aircraft.
 
Pushback is not possible for this.

Negative speeds won't work? Well, I will see. ;)

You may want to think about creating a traffic bgl for that flight if the aircraft should behave like a normal AI aircraft.

:o O guru of FSX SDK, bear with a poor rookie... What in the world is a "traffic bgl"? I thought that BGL's are scenery files... :eek:

My goodness. I knew it would be tough, but there is a LOOOT more to learn that I ever dreaded... :D

How does FSX know, where the airplane should take off? And are the speeds interpolated between waypoints?

Robin <><
 
Speeds are more or less interpolated. The taxi waypoints should be selfexplanative (don't use speeds faster than 15kts in turns).

On the runway place a waypoint at the start of the runway with say 20 kts, then the next one at the end of the runway with altitude 100-300ft and speed >200kts. This will make the aircraft takeoff.

traffic bgls can easily be done with tools like AITraffic (or has the name changed?). Look into the forums here for tipps about that. The traffic tools are rather easy to use.

All AI aircraft and ships on schedule are compiled into bgl files. ;)
 
I see. I'll try that as soon as I manage to get that airplane moving on the ground.

Under AircraftAI in the Poperty Sets box, I have both TakeoffAI and TaxiAI. Could it be that having both entries is blocking it? But I can't remove either of the entries... How do I remove them???

And what is the correct "Unit_mode"? I understand that you can only use "SIMPLE_FLIGHT" and "SIMPLE_TAXI" in AircraftAIState, but what about this Unit_mode???
 
Simply don't touch all those fields. ;)

Only thing important is the AI type, aircraft state and waypoints.
 
OK, and how do I delete the second entry under AircraftAI in the Poperty Sets box? I created a second AI plane which taxis OK, but the first one tries to take off right away.
 
Simply delete it and create a new one.

Another valuable hint maybe not to assign any waypoint, or (because that may cause the mission to not load correctly) only assign 1 waypoint at the same location where the aircraft starts (speed set to "0"!). This way the aircraft is on hold until you assign a "givewaypointsaction".
That way you have more control over the aircraft and even can use the waypoints for several aircraft (afaI remember).
 
OK, the culprit was not the TakeoffAI, but the "BackupToFirst" set to true in the Waypoint List.

I'll try the "dynamic waypoint" thing... I guess that's the key to starting the movement of aircraft at different moments? Or is there another way?

Tia,
Robin <><
 
There is: set "active" to false and activate it whenever you want it to start.
But this way the aircraft won't be visible before activation of course.
 
Got it working!

Yup, found that out already, but the ActivateWaypoint thing is exactly what I needed. AI is moving! Way to go!

Thanks a lot. :wave:

Robin <><
 
Back
Top