Getting errors saying it could not read script file engine.nas into module 
engine.

Could it be that the values for the cuttoff and reverse should be true or 
false not 0 or 1 .
If so can you rewrite that script so if i change ( toggle ) cutoff from false 
to true and visaversa it will write to the reversed property either true or 
false.
Then maybe you can kill me for all this hassle , but beleive me i do 
appreciate the help you are providing me.

I found how to implement the script i added into the set.xml file

<nasal>
<engine>
   <file>Aircraft/737-300/Systems/engine.nas</file>
   </engine>
 </nasal>

Regards,
Justin Smithies


On Monday 06 March 2006 12:45, Melchior FRANZ wrote:
> * Justin Smithies -- Monday 06 March 2006 13:40:
> > But just to get me going could you write it out as if it
> > was doing the following in script form.
> > That should help me heaps to understand this and keep me busy too ;)
> >
> > Say i wanted to monitor the /engines/engine[0]/cutoff property.
> > If it ever changed to true i would like to erm just for the sake of it
> > say turn /engines/engine[0]/reverse to true.
>
> Assuming that you only want changes from "false" to "true",
> then you'd write something like that:
>
>   last_cutoff = 0;
>   setlistener("/engines/engine[0]/cutoff", func {
>           var new_cutoff = cmdarg().getBoolValue();
>           if (new_cutoff and !last_cutoff) {
>                   setprop("/engines/engine[0]/reverse", 1);
>           }
>           last_cutoff = new_cutoff;
>   }, 1);
>
>
> ... because the function isn't really only called on property
> changes, but rather whenever the property is written to. Even
> if it's the same value that's written. The 1 in the last line
> makes sure that an initially "true" cutoff also sets the
> reverser, which you may or may not want.
>
> m.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live
> webcast and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to