OK by fiddling around and looking at other models actions I got the H key now working for horn without resorting to the workaround with the L key. The solution was quite simple/obvious. Seems that the name of action is the one defined in the outerra help menu for controls. So for horn its "car/controls/horn" and as it is not a switch but an event register it as event. Actually in the keybinding appears written as "Horn" not "horn". Similarly with other actions the names in the menu do not appear to exactly match the events/actions/switch registering code in the js file of some models (for example the BMW). It seems that this.register_event("car/controls/Horn", horn_action); does not work while this.register_event("car/controls/horn", horn_action); does work. Some help please Cameni, for the exact names to use in the event/switch ...registering. Where can we find updated info on actions ?
function init_chassis()
{....
_snd_bell = this.load_sound("bell.ogg");
_src_bell = this.add_sound_emitter(WHEEL_FL );
_act_horn = this.register_event("car/controls/horn", horn_action);
....}
function init_vehicle(){
....
this.snd = this.sound();
this.snd.set_ref_distance(_src_bell, 5.0);
...
}
function horn_action(){
this.snd.play(_src_bell,_snd_bell,false,false);
}