Jump to content
Sign in to follow this  
thomsonb

Single Player onPlayerKilled.sqf workarounds?

Recommended Posts

Hi

I am talking here about Single Player missions only:

It seems the "onPlayerKilled.sqf" file doesn't work in Arma3.

Is this confirmed or am I doing something stupid?!

Are there any workarounds for this?

I desperately need to avoid the mission ending with the "You are dead" camera and restart menu.

On a related subject; is there any way to go to a debriefing after death, instead of just the "You are dead" screen?

any help greatly appreciated

B

Share this post


Link to post
Share on other sites

Whoa, thomsonb and his hell is back in Arma3! :)

I could never make this work in A3.

I use eventhandler instead on the player. Cleaner thing, which runs before mission ends, so you can easily create and assign a new player. Aka respawn.

{
 _x addEventHandler [ "killed",{if (_this select 0 == player) then {[]call MyRespawnScript};} ];
} foreach _unitsWhoCanBePlayers;

Edited by zapat

Share this post


Link to post
Share on other sites
...use eventhandler instead on the player..... create and assign a new player...

Thanks zapat, that works well. I had to use the selectPlayer command quickly before the "You are dead" screen apears.

Cheers

B

Share this post


Link to post
Share on other sites
I had to use the selectPlayer command quickly before the "You are dead" screen apears.

Did you? I guess if you CALL the script then it is processed within the eh, so you have all the "time" you need (of course you cannot sleep or waituntil). What I mean is that it is not command execution time sensitive. I do lots of things before finally I select the new player. Like really lots of stuff.

Of course if you spawn it is another story...

(Is Flashpoint - one of my two favourite A2 missions - coming to A3? :) )

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  

×