I have hit a snag while writing some Nasal script for the Spitfire model:

I put this in the spitfireIIa-set.xml file

<controls> 
      <engines> 
        <engine n="0"> 
          <magneto-switch type="bool">1</magneto-switch>
          <magneto-switch type="bool">1</magneto-switch>
        </engine>
      </engines>
</controls>

 
I then try to access it elsewhere.

This works:

<binding> 
        <command>nasal</command>
        <script>
        setprop("controls/engines/engine/magneto-switch[0]",1);
        </script>
</binding>
           
But this doesn't:
 
<binding> 
        <command>nasal</command>
      <script>
        setprop("controls/engines/engine/magneto-switch[1]",1);
        </script>
</binding>

I can work around it no problem, but I think that it should work. I can see,
but can't access ../magneto-switch[1] in the Browse Internal Properties
dialog either.

I think that it may be a property tree issue rather than Nasal. Any
guidance/ideas? 

Regards

Vivian 



_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to