Hello, I would like to be able to change the lightbar mode (chase, takedown, and so on) from Lua. Unfortunately, the only thing I found so far (in vehicle VM) is electrics.set_lightbar_state(..). After going through the Lua code, I've noticed that in \lua\vehicle\controller\lightbar.lua, there is a function called setModeIndex, but I cannot figure out how to access it from either the GE VM or vehicle VM. If anyone could point me to the right direction, I would greatly appreciate it. Thanks!
Code: local lightbar = controller.getController("lightbar_rear") lightbar.setModeIndex(1) This works only in VE
Thanks! Though, in my case, I had to call Code: controller.getController("lightbar") to get the modes to switch.