* [EMAIL PROTECTED] (Andy Ross) [2004.01.28 09:47]:
> Cameron Moore wrote:
> > Is it possible to use nasal scripting in preferences.xml?  I'm
> > specifically interested in using it in a <view> definition.
> 
> You can have Nasal blocks under /nasal/<module name> in the property
> tree like this:
> 
> <nasal>
>  <my-module>
>   <file>Where/Ever/my-module.nas</file>
>  </my-module>
> </nasal>
> 
> Or you can put the source code inline inside a <script> tag.  You can
> do the same thing with the aircraft -set.xml files.
> 
> Global nasal code like this runs at the end of initialization, so you
> will see the property tree as it will look at the beginning of
> execution.  Note that you will therefore *not* be able to synthesize
> properties to affect the initialization of other code.

Okay.  I read all that in your docs last night.  :-)  But after knowing
all that, I still know if it will do what I want...

> What exactly are you trying to do?  Run a script when the view
> changes?  Probably the best way to do that would be to have a command
> binding inside the <view> tag; the code in view.nas could then invoke
> it after the switch.

I'm wanting an auto-zooming tower view.  We could implement it in C++,
but I thought I'd give nasal a shot.  My plan was basically to take the
current lookat Tower View and use nasal scripting to set an offset from
the eye location projected toward the model.

The reasoning behind this is that I want to have an RC-type view that's
more usable.  Normally the aircraft gets very small, very fast trying to
fly from the tower view.  I'm wanting to set a max distance from the
aircraft to the eye location.
-- 
Cameron Moore
[ I'm trying to daydream, but my mind keeps wandering. ]

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

Reply via email to