Instead of in the xml I think it needs to be done with a listener or timer loop in nasal.
I have no idea of how to do this with what I understood of how FG loaded the aircrane.xml file. And it seems you had this exact same problem considering your first post of this subject.
Therefore, I just found out that we can reload the aircraft model (but I guess it is not linked to sound and probably more things).
It not a solution for the rescue winch idea but it would for the cargo to rope style.
It works if I change manually the <z-m> factor but I cannot find a way for the xml file to "read" from nasal .
Here are my tries:
aircrane.xml:
- Code: Select all
<x-m>
<nasal>
<open>
<![CDATA[
props.globals.getNode("/ai/models/aircraft[1]/x-m-offset").getValue();
print(props.globals.getNode("/ai/models/aircraft[1]/x-m-offset").getValue());
]]>
</open>
</nasal>
</x-m>
<!--y-m>
<![CDATA[props.globals.getNode("/ai/models/aircraft[1]/y-m-offset").getValue();]]>
</y-m-->
<y-m>
<binding>
<command>nasal</command>
<script>
print(props.globals.getNode("/ai/models/aircraft[1]/y-m-offset").getValue());
#props.globals.getNode("/ai/models/aircraft[1]/y-m-offset").getValue();
</script>
</binding>
</y-m>
<z-m>-2.5</z-m>
and the thing is that I do not get error so I could understand.