You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I figured out how to call the method without errors ( already corrected the AICreateNonATCAircraft args types as in issue #112 )
This script runs fine, but the aircraft doesn't seem to appear in MSFS at Lat 40,Lng-74
fromSimConnectimport*fromctypesimport*sm=SimConnect()
aq=AircraftRequests(sm, _time=3)
ae=AircraftEvents(sm)
# get class definition for SIMCONNECT_DATA_INITPOSITIONsm_types=sm.dll.AICreateNonATCAircraft.__ctypes_from_outparam__()
INIT_POSITION=sm_types.argtypes[3]
initPos=INIT_POSITION(c_double(40), c_double(-74), c_double(2000), c_double(0), c_double(0), c_double(0), DWORD(0), DWORD(-1))
sm.dll.AICreateNonATCAircraft( sm.hSimConnect, c_char_p(b"Boeing 747-8f Asobo"), c_char_p(b"ABCD"), initPos, 123 )
The text was updated successfully, but these errors were encountered:
Hy return with this code and some good news, I just made that insert a Giraffe with this code maybe can help to others... close to MMVR GA parking
from SimConnect import *
from ctypes import *
# Inicialización de SimConnect
sm = SimConnect()
aq = AircraftRequests(sm, _time=3)
ae = AircraftEvents(sm)
giraffeID= 0
# Obtén la definición de clase para SIMCONNECT_DATA_INITPOSITION
sm_types = sm.dll.AICreateSimulatedObject.__ctypes_from_outparam__()
INIT_POSITION = sm_types.argtypes[2] # Esta hay que activarla para AICreateSimulatedObject
InitPos = INIT_POSITION(
c_double(19.1413),
c_double(-96.1849),
c_double(76.6),
c_double(0.0),
c_double(0.0),
c_double(0.0),
DWORD(1),
DWORD(0)
)
# Crear el objeto simulado y asignar el callback
sm.dll.AICreateSimulatedObject(sm.hSimConnect, c_char_p(b"ReticulatedGiraffe"), InitPos, giraffeID)
Next step make that giraffe moves... If I understand well the SDK 2020 maybe seem that is only posible if some array of waypoint will be atached to the simobject, but at this moment my skills doesn't work maybe someone else can help to implement the movement?
I figured out how to call the method without errors ( already corrected the AICreateNonATCAircraft args types as in issue #112 )
This script runs fine, but the aircraft doesn't seem to appear in MSFS at Lat 40,Lng-74
The text was updated successfully, but these errors were encountered: