Jump to content
Sign in to follow this  
xJordannx

addAction disappears when I respawn/die

Recommended Posts

Hi, every time I respawn or get killed etc, my addAction options will disappear, could anyone help?

Thanks.

Share this post


Link to post
Share on other sites

you need to create file that keeps calling the add action, can implement it at the start. place the code in the players init.

or you can look at using addeventhandler killed. various ways to get round it.

Share this post


Link to post
Share on other sites
you need to create file that keeps calling the add action, can implement it at the start. place the code in the players init.

or you can look at using addeventhandler killed. various ways to get round it.

Hi, I tried using an event handler but it didn't seem to work, would you mind explaining how I would create a file that keeps calling the addaction?

Thanks.

---------- Post added at 22:12 ---------- Previous post was at 20:46 ----------

Found a fix myself, don't need help any more.

Share this post


Link to post
Share on other sites
Hi, I tried using an event handler but it didn't seem to work, would you mind explaining how I would create a file that keeps calling the addaction?

Thanks.

---------- Post added at 22:12 ---------- Previous post was at 20:46 ----------

Found a fix myself, don't need help any more.

Mind posting the fix so others can benefit? :)

+1. Sharing this kind of information is sort of why we're here.

Share this post


Link to post
Share on other sites

I think this topic will be helpful to get the addaction back. It's a script made by Demonized that normally adds static weapons that a player can deploy with addaction, but it is easily modified to do what you want, matter of changing some variables and stuff. I use a modified script of this too and it works great.

http://forums.bistudio.com/showthread.php?121753-Deploy-Static-weapon-object-script

Share this post


Link to post
Share on other sites

You could solve it using the init.sqf.

Example i found is a healscript (healSelf.sqf).

// Add it the first time.
player addAction ["Heal Self", "healSelf.sqf", [], 1, false, true];

// Add it back when you die.
while {true} do {
waitUntil {!alive player};
// uh oh...
waitUntil {alive player};
player addAction ["Heal Self", "healSelf.sqf", [], 1, false, true];
};

Share this post


Link to post
Share on other sites

Also keep in mind that action still remains on your dead body and will be accessible if you will find the body after respawn.

Share this post


Link to post
Share on other sites

Which is why you should remove the actions from that body when you die :)

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  

×