On Saturday 24 June 2006 09:14, Melchior FRANZ wrote:
> In the past aircraft with machine guns/cannons each had their
> own way of firing those. There was no unfied way. The bo105
> used the js trigger button, Vivivan's aircraft assinged no
> key/button, but listened to the /ai/submodels/trigger
> property, the OV10 used /controls/armament/trigger.
>
> I've now added a general gun-trigger wrapper function to
> controls.nas, which should be used by all armed aircraft: 
> controls.trigger(bool) This function does nothing else than
> set property /controls/armament/trigger on and off, according
> to the bool.
>
> It would be great if all other aircraft would adopt this
> method. To either listen to the default property
> /controls/armament/trigger, or to redefine that whole function
> to do whatever is necessary. The important thing is, that
> calling controls.trigger(1) should fire the gun, and
> controls.trigger(0) should stop it.
>
>   controls.trigger = func { my_own_trigger_struff(arg[0]) }
>
> No key or joystick button uses that controls.trigger()
> interface by default, but people who want this functionality
> on their js should only have to use this function and get the
> expected result on any aircraft. (I've put my gun trigger on
> the joystick under "Ctrl-Fire".[0])
>
> The bo105/hurricane/spitfire/seafire/ov10 all do the right
> thing already. The Mig doesn't yet and probably a few others.
> (Its e-key could keep the current binding, but calling
> controls.trigger(1) should have the same effect if possible.)
>
> m.  :-)
>
>
>
> DISCLAIMER: yes, we all know, war/killing is bad, fgfs is a
> civilian simulator etc. OTOH, military aviation isn't exactly
> an unknown phenomenon, and guns are a part of it.  :-P
>
>
> [0] using joystick buttons with keyboard modifiers is easy:
>
>    <binding>
>        <command>nasal</command>
>        <script>
>            if (getprop("/devices/status/keyboard/ctrl")) {
>                controls.trigger(1);
>            } else {
>                controls.applyBrakes(1);
>            }
>        </script>
>    </binding>

Hi Melchior,

I've already e-mailed you about this so I'm just saying it all 
looks good to me here for the benefit of everyone else :)

Both the A-10 and MiG-15bis will need updating.

LeeE


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
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to