Jump to content
Sign in to follow this  
messiahua

Handle group respawn event

Recommended Posts

I need to execute some code in addon when player respawns in other unit inside group (if respawn = 4 in description.ext). I've tried using extended event handlers (cba xeh) and also script command add(MP)EventHandler (respawn/mprespawn), but it doesn't work (rpt only says "Group respawn processed locally").

The only script, that gets executed is onPlayerRespawnOtherUnit (http://community.bistudio.com/wiki/Event_Scripts), but I need to do this inside pbo, so that's a no go. I've searched all over the place + google, but found nothing.

Is it possible to handle group respawn in addon somehow?

Share this post


Link to post
Share on other sites

Implemented alternative solution: endless scripted loop which checks if player != player...

Share this post


Link to post
Share on other sites

Didnt understand what you are trying to do...

But instead if your loop you can do this:

waitUntil {!alive player};

Also you can add some small amount of sleep like:

waitUntil {!alive player; sleep 0.1};

Dont forget to execute this command in another thread or your script after this command will be frozen until player is dead.

To execute in another thread:

[] spawn { waitUntil {!alive player; sleep 0.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  

×