function ground_api_GenerateGroundbyGroundModelID(ID: Cardinal):TGround;
begin
result:=g_EinsatzList.NewEinsatz;
Assert(result<>nil);
result.Name:=ground_api_GetGroundModelByID(ID).Name;
result.Description:=ground_api_GetGroundModelByID(ID).Description;
result.Objectives:=ground_api_GetGroundModelByID(ID).Objectives;
result.SensorText:=ground_api_GetGroundModelByID(ID).SensorText;
result.RemainTime:=ground_api_GetGroundModelByID(ID).RemainTime;
result.MapName:=ground_api_GetGroundModelByID(ID).MapName;
result.UFOModelID:=ground_api_GetGroundModelByID(ID).UFOModelID;
result.UserTag:=ground_api_GetGroundModelByID(ID).UserTag;
result.SetAIScript(ground_api_GetGroundModelByID(ID).AIScript);
end;
Analog läuft es, wenn bei einem normalen Einsatz automatisch ein Groundmodell ausgewählt wird (falls ein solches existiert).
Mit SetAIScript wird das Skript gestartet. Zu beachten ist, dass je Objekt immer nur ein AI-Skript laufen kann. Wird SetAIScript erneut aufgerufen, wird das laufende AI-Skript mit Mission_Abort beendet.