- Messages
- 5,944
- Country
Does anyone have an example of a scenery SimObject that does not loop? What is the required xml to halt the animation at a specific keyframe?
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.
Ask Jon in the MSFS ADE forum.Thanks in advance for further clarification on how to test placement and display of this example SimObject via ADE.
That would be good, Like a tooltip or something. But I'm afraid it's not really possible because you'd have to alter the aircraft somehow. Perhaps a better solution would be a proximity trigger in the hangar animation, so the door opens when you are in position automatically,Hi dick
Do you have any idea how to get the pilot to know that he can open the hangar?
A tooltip?
Thank you for your finds and your sharing!
One of the variables that can be read by the sim is Surface Type...
<?xml version="1.0" encoding="utf-8" ?>
<ModelInfo version="1.1" guid="{f50ce35e-35fe-4b0b-8bb7-02242401e711}">
<LODS>
<LOD minSize="0" ModelFile="TriggerHangar.gltf"/>
</LODS>
<Animation guid="259d4897-5033-4d21-a575-d45dcb965f22" length="100" name="DoorLeft" type="Sim" typeParam="AutoPlay" typeParam2="DoorLeft"/>
<Animation guid="665f9750-aea8-4cac-afb4-650101ba674d" length="100" name="DoorRight" type="Sim" typeParam="AutoPlay" typeParam2="DoorRight"/>
<AnimGraph>
<DefaultState name="TriggerHangar_Close"/>
<BlendTreeState name="TriggerHangar_Close">
<Animations>
<Animation guid="259d4897-5033-4d21-a575-d45dcb965f22" loop="False" speed="1"/>
<Animation guid="665f9750-aea8-4cac-afb4-650101ba674d" loop="False" speed="1"/>
</Animations>
</BlendTreeState>
</AnimGraph>
<PartInfo>
<Name>DoorLeft</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:SURFACE TYPE,enum) 20 == if{ 50 } els{ 0 }
<!-- (L:XMLVAR_YokeHidden1) 1 == if{ 50 } els{ 0 } -->
<!-- (E:LOCAL MONTH OF YEAR, Number) 4 == if{ 50 } els{ 0 } -->
</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</PartInfo>
<PartInfo>
<Name>DoorRight</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code>
(A:SURFACE TYPE,enum) 20 == if{ 50 } els{ 0 }
<!-- (L:XMLVAR_YokeHidden1) 1 == if{ 50 } els{ 0 } -->
<!-- (E:LOCAL MONTH OF YEAR, Number) 4 == if{ 50 } els{ 0 } -->
</Code>
<Lag>10</Lag>
</Parameter>
</Animation>
</PartInfo>
</ModelInfo>
Right now, the only way to read or write LVars is from a WASM module, because there are wrappers in WASM for all functions of the old Panels interface, which includes the ability to read/write LVars.
However, there's no easy way to export them to the outside world. for example an external Simconnect client, since WASM modules cannot call any of the WIndows API features ( Named Pipes, Socket, IPC, etc ) that are usually used to send data across processes.
It MIGHT ( although I haven't tried ) be possible to use Simconnect itself to communicate between a WASM module ( which, as of today, can only be a Gauge, since standalone modules are not supported yet ), using the SimConnect_CreateClientData, SimConnect_RequestClientData, SimConnect_SetClientData ( etc. ) functions, so the WASM gauge could communicate with an external .EXE using Simconnnect itself as a transport, and sharing data using some kind of protocol to handle LVars.
It's quite tricky, but might work, provided all the following will work:
- those Simconnect calls working as they did in FSX/P3D, both in the external .EXE and in the WASM module, which not something to take for granted, since even more basic functions are still INOP today.
- until WASM works only with Gauges, it will be fairly impractical, since you would have to add this "proxy" gauge to every airplane you have, something that wouldn't be required if the module could just start with the sim, like any other .DLL
- You'll have to create some data exchange protocol to act on LVars, design the data areas, work with strings ( LVar names ) which can be tricky
It would be way easier if Asobo just added support for LVar to Simconnect natively, so you could just use it from an external .EXE, without having to deal with any of that.
I can confirm the XML code using A: parameter is accessing the SimObject rather than the User aircraft. Using this:The only problem with using the yoke hiding for a trigger is that not all aircraft have that built in. The A: variables in the SimObject XML don't read the user aircraft's A:, but I think use the SimObject's A:, so with a static object, it's really pointless to try them. I'l study the default ground vehicles and see if they have something that can work.