Melchior, # you sent me some of emails but this topic can be shared with others, so I'll post it to the list.
Thanks for sending me the patch. I'm going to update the script with your patch (for both Ki-84 and J7W). I will also have implement the canopy movement in j7w/Models/j7w.xml soon if time allows. Actually the canopy of J7W is temporal for now so opening/closing canopy is not implemented yet. I'll also try to find a way to avoid the Nasal error. It should happen in Ki-84 and A6M2 too, maybe only on CVS version. And I guess this is why fdm_initialized signal is introduced in CVS version, right? I think I can put a line or two to check if the parameter is null in updates(). Though it's a bit redundant in CVS version but It works on both versions. As a matter of fact, I used this way to avoid "nil used in numeric context" in converting units for gauges (for different reason though). I'm very happy to know if there's a way to share the same code with both versions without redundancy on this issue. Finding a signal that works on both versions can be good, or I should make scripts for two different versions, which I don't want to. Tat On Feb 1, 2007, at 3:09 PM, Melchior FRANZ wrote: > * Tatsuhiro Nishioka -- Thursday 01 February 2007: >> I've started J7W Shinden, an Imperial Japanese Navy intercepter for >> FlightGear. > > Tried it out ... fun to fly. :-) > > But I got one Nasal error: > > Nasal runtime error: nil used in numeric context > at /home/m/fgfs/Base.local/Aircraft/j7w/Nasal/j7w.nas, line 16 > > The updates() function is simply started too early, before the > FDM is up. Why not start it in the "fdm-initialized" listener? > > The attached patch fixes it, and it does also use the aircraft.door > class for the canopy. This isn't a requirement, but has the advantage > that the canopy is moved with constant speed. Otherwise you'd *always* > get 2 seconds movement, even if you reverse movement at the half way. > Currently the rest would still take 2 seconds, effectively moving with > half speed. The aircraft.door class has a rich interface (move(), > open(), > close(), ...). You could, for example, dump the whole listener, and > just use the nasal command "j7w.canopy.toggle()" in the bindings. > > m. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel