Arma 3
3CB Factions
Giovanni 12 May, 2023 @ 3:33pm
Removing vehicle sirens/lights actions
Hi there, our server is looking to remove the actions added to the police vehicles for toggling the lights or sirens. These are added in the UserActions of each police vehicle in CfgVehicles. Since we have our own script for the lights/sirens, which use keybinds, we want to remove the pre-existing ones so there are no conflicts.

Currently I am overriding the actions using inGameUISetEventHandler to disable them entirely, but this does not remove the action from the scroll list. As far as I am aware, there is no way for us to do this using scripts.

Would it possible to add a disabled variable which the action checks in its condition?

For example, this is the current condition:
condition = "!(this getVariable ['UK3CB_Siren_Active', false]) AND ((call CBA_fnc_currentUnit) == driver this) AND (alive this)";

if there was a UK3CB_Siren_Disabled variable, we could set that on the vehicle in our mission and then the action would no longer show. the code would have to be updated to this:
condition = "!(this getVariable ['UK3CB_Siren_Disabled', false]) AND !(this getVariable ['UK3CB_Siren_Active', false]) AND ((call CBA_fnc_currentUnit) == driver this) AND (alive this)";

If there's any other way to accomplish this, I would certainly be open to hearing about it. Thank you!
< >
Showing 1-4 of 4 comments
Evrik 13 May, 2023 @ 7:59am 
Hello. I think your suggested code changes would work, however it would require code changes throughout the mod pack as most vehicles have sirens / lights (or are hidden on the model) and user actions for their use. Adding the suggested changes would require a lot of time and testing to make sure it doesn't break anything else. Alternatively, you can make a small config mod for whatever vehicles you want to use for your missions that inherit from our vehicles but only include the inherited useractions you want.
Giovanni 14 May, 2023 @ 3:09am 
I like the idea of overriding CfgVehicles with a custom mod, I think we can go with that. Thanks for the quick response!

On a side note, are there any templates available that we can use for creating custom textures for the various 3CB vehicles?
Last edited by Giovanni; 14 May, 2023 @ 3:10am
Shurikpodlec2009 14 May, 2023 @ 4:28am 
HI
Evrik 18 May, 2023 @ 4:13am 
@Giovanni: Most of the vehicles use the original textures from arma 2. You can download those via the BIS sources / original .pbos. Others use RHS vehicles so can use their templates. If you need any of the others, let me know and I'll see about making them available when I have the time.

@shurikpodlec2009: Hello.
< >
Showing 1-4 of 4 comments
Per page: 1530 50