Jump to content
webbie.

Virtual Arsenal after Destoyed

Recommended Posts

Hi,

 

I have searched far and wide for an answer but have gotten nowhere any help appreciated.

 

Heres the issue. 

 

My MP mission has MHQ bikes that work perfect however when they are destroyed they lose the virtual arsenal.

I have tried various methods to fix it hoever nothing seems to be working even when no errors are displayed.

Ive tried via init and add actions also by following the guidelines on arsenal from BIS. Ive also tried doing via expression field in the vehicle respawn.

 

Thanks.

Share this post


Link to post
Share on other sites

Hello, you could try add action to player himself both in initPlayerLocal.sqf as well as onPlayerRespawn.sqf

player addAction ["Arsenal", {["Open", true] spawn BIS_fnc_Arsenal}, nil, 0, false, true, "", "cursorObject isEqualTo my_splendid_mhq"]

I hope this helps

  • Like 1

Share this post


Link to post
Share on other sites

When the MHQ respawns its a new vehicle so you will have to add the Arsenal action to it again clientside.

Share this post


Link to post
Share on other sites
14 hours ago, PUG webnebular said:

Ive also tried doing via expression field in the vehicle respawn

This should work. Arguments passed to expression are [ newVehicle, oldVehicle ].

 

params[ "_vehicle" ];
_vehicle addAction[ "Arsenal", { [ "OPEN", true ] call BIS_fnc_arsenal } ];

 

Share this post


Link to post
Share on other sites

Thank you @Larrow @Jigsor @NikanderI'll give it a try, I don't think I've attempted with the add action. You do good work here thank you kindly. I did actually try your implementation jigsor but my scripting is still fairly noobish. 

Share this post


Link to post
Share on other sites
6 hours ago, Larrow said:

This should work. Arguments passed to expression are [ newVehicle, oldVehicle ].

 


params[ "_vehicle" ];
_vehicle addAction[ "Arsenal", { [ "OPEN", true ] call BIS_fnc_arsenal } ];

 

@Larrow I added this to the expression line and while arsenal does display the arsenal itself isnt loading. Perhaps I need to add arsenal to init line?

 

EDIT: Nope, tried that still no joy, arsenal is displaying though so thats progress

EDIT: Is params[ "_vehicle" ]; in the expression line or am i actually using that as a param on the vehicle?

Share this post


Link to post
Share on other sites

Vehicle init...

this addAction[ "Arsenal", { [ "Open", true ] call BIS_fnc_arsenal; } ];

In vehicle respawn modules expression ( notice case of Open, my mistake in previous post as it is case sensitive )

params[ "_vehicle" ];
_vehicle addAction[ "Arsenal", { [ "Open", true ] call BIS_fnc_arsenal; } ];

 

Share this post


Link to post
Share on other sites
28 minutes ago, Larrow said:

Vehicle init...


this addAction[ "Arsenal", { [ "Open", true ] call BIS_fnc_arsenal; } ];

In vehicle respawn modules expression ( notice case of Open, my mistake in previous post as it is case sensitive )


params[ "_vehicle" ];
_vehicle addAction[ "Arsenal", { [ "Open", true ] call BIS_fnc_arsenal; } ];

 

really I didnt think case made a difference, ok, well thats good to know thank you for your help ill give it a go. Thank you for your help its appreciated

 

Share this post


Link to post
Share on other sites

Thank You @Larrow That did the trick. Cant be thankful enough!

 

Dont know anything about the support modules at all do you?

Share this post


Link to post
Share on other sites

Credit on the server for you LarrowF50Wjrm.jpg

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

×