Vivian Meazza wrote:

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?



Does your spitfire have more than one magneto switch? This generally implies more than one engine. The value of the first magneto-switch[0] is probably what you want to be changing.


Regards,

Curt.

--
Curtis Olson http://www.flightgear.org/~curt HumanFIRST Program http://www.humanfirst.umn.edu/
FlightGear Project http://www.flightgear.org
Unique text: 2f585eeea02e2c79d7b1d8c4963bae2d



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

Reply via email to