User mods, screenshots & videos > Aircraft

work on bk117 helicopter

(1/5) > >>

fly77:
Finally I have learned to fly the bk117 helicopter by using a lot the trim and setting joystick sensivity to high and a deadzone to narrow.
Then I made some modification to the javascript to set up zoom (see code below for the core of it). Then as I pressed +/- keys on numpad to zoom keys while flying the bk117 heli up came this screen while zoom does not work..
the +/- keys seem associated to something different for the bk117..
What is its purpose ? Could I program similar nice sliders and buttons on my own ..look like java buttons?




--- Code: ---
function update_frame(dt){

  fov_cockpit_zoom = 81.8;
  this.register_axis("air/sensor/fov_zoom", {minval:0, maxval:1, vel:1, center:0}, function(v){
    var dec2int = v*48;
    var integer = Math.floor(dec2int);
    var string = 81.8 - integer.toString();
    fov_cockpit_zoom = string;
  });
 
   if (this.get_camera_mode() == 0){
    ot_world.set_camera_fov(fov_cockpit_zoom);
  }
--- End code ---


cameni:
It's an old window used for initial setup. Otherwise it's a normal html window.

What you can do is make such an html, set the path in config (see T817 script, property config returned from init_chassis).
The window will open when pressing the key bound to the ot/player/open_config action.

$object in the html corresponds to the vehicle interface there, but you should see it in the example.

fly77:
Thanks a lot ! Interesting. Will try it.
By the way I found the reason why it came up. I put the register axis command in update frame instead of initialize_reload.

Revolver:
Hi Marco!

It becomes very interesting and of all worthwhile, if there can save under each flight object its own settings.
If you understand what I mean ... ;)

Gruß,
Stefan

fly77:
yes I understand well what you mean. Will try if I can get it to work to make something useful

Navigation

[0] Message Index

[#] Next page

Go to full version