I have a switch that controls a line between a battery bus and another bus. This switch acts as the battery switch since the battery is always connected to some things, regardless of switch position, and the default behaviour is to turn the battery off at the source.
I have this switch working and controlling the line with the EX1 templates, but I was hoping to bind the default Battery key events to this switch as well.
Can the “ASOBO_Add_Binding_Helper” be used to do this? If not is my only option redoing the switch with a custom Input event?
If I can use the “ASOBO_Add_Binding_Helper”, how does it work? i tried adding it to the main component with an event ID but that caused a build error.
Inserting into Behaviour_Config_Prog.xml fixes the build, but also isn’t doing what I thought it would do. Any help or pointing in the right direction would be greatly appreciated.
The issue here is that you’ve got BINDING_EVENT set to TOGGLE - this isn’t a valid binding event.
You can use either SET, INC or DEC. In this case you just want to set the value to either 0 or 1, so you would use set. You could also use the ASOBO_Add_Set_Binding_Helper parameterfn
Thanks, I see where i was going wrong using that method.
With the procedure method I can also see the issue. The stock “Master Battery” toggle Key event is different to the standard events. Its called TOGGLE_MASTER_BATTERY. Where the template is expecting a toggle event to be MASTER_BATTERY_TOGGLE
This would look nicer if I stuck to the first method, but this works fine too.
Now the master battery key commands are intercepted and move my custom battery switch without affecting the true master battery switch.