Jump to content
_gm_

Script AI interaction with Addon functions

Recommended Posts

I'm creating an MP mission featuring the RHSUSF Mk.V SOC (boat) that has different lighting options only accessible by the driver via a GUI control panel (switches/buttons). When crewed and placed in Safe mode, AI activates collision lights automatically - that's fine. I want to control the sub-items (Nav lights, night lights, dive lights, searchlight, horizon lights) which the control panel calls through non-BIS functions (rhsusf_c_markvsoc\scripts\ui) while the AI is driving - AI will be driving the boat to WPs.

 

I found this piece of code in rhsusf_c_markvsoc\scripts\ui\markv_ui.hpp

action="[7005,'rL_opR_source'] call rhsusf_fnc_markvsoc_setOption";

If I get in the driver position as a player and use the debug console to execute a modified version:

[7005,'rL_opR_source'] call rhsusf_fnc_markvsoc_setOption;

The night lights toggle if "lightsOn" is true. Any value seems to work in place of "7005", so it doesn't seem that's passing anything critical.

 

So I'm that far, but I want to apply this to a boat named "soc_1" that AI is driving. All MP players will get in passenger seats and I want the lights on before we even get there.

 

I tried putting that call in the boat init, along with an action telling the boat driver "lightOn" and it doesn't seem to work - but I get no errors either.

Edited by _gm_

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×