Josh Babcock wrote:
> loadBombs = func {
> # Find out which bomb configuration we are now using.
> loadout_index = getprop('/sim/weapons/current-loadout');
>
> # Delete any YASim weights.
> weights = props.globals.getNode('/yasim/weights/bomb-bay');
> racks = weights.getChildren();
> foreach (rack, racks) {
> rack.setDoubleValue(0);
> }
>
> # Set all the bomb triggers, and assign the proper weights for YASim.
> loadout =
> props.globals.getNode('/sim/weapons/loadout['~$loadout_index~']');
> bombs = loadout.getChildren();
> foreach (bomb, bombs) {
> dropped = bomb.getNode(dropped);
> dropped.setBoolValue(false);
> # A MIRACLE OCCURS
> }
>
> }
>
Oh, and I have fixed the foreach typo, however I have still not figured
out the correct way to set the node 'dropped' :)
Josh
-------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel