Jump to content
Sign in to follow this  
blowitup!

Adding Arsenal to player actions on respawn

Recommended Posts

Hi,

 

I want to add the option for the player to have "Arsenal" in the their action list. I currently have " ["AmmoboxInit", [this, true]] call BIS_fnc_arsenal; " in the player init field and that works on mp mission start, but when you inevitably die and respawn the option disappears. Can someone please show me what the code is that will keep the functionality after repawn? Thanks.

Share this post


Link to post
Share on other sites

In the root folder of your mission, create the file "onPlayerRespawn.sqf":
 

params ["_newUnit", "_oldUnit", "_respawn", "_respawnDelay"];

_newUnit addAction ["Arsenal", {["Open", true] spawn BIS_fnc_arsenal}];

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks Harzach,

 

That doesn't seem to work as intended though. I created a new mission and copied and pasted the code into the onPlayerRespawn.sqf as instructed, and in game it appears on first spawn, but not after respawn...

Share this post


Link to post
Share on other sites

Sorry, you need to add it as an action menu item. Original reply edited.

  • Like 1

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
Sign in to follow this  

×