monkeybrain

Executing a script when player has died

4 posts in this topic

i was looking at the ExileClient_object_player_event_onPlayerKilled and was trying to figure out how to execute a script for say a sound or something when the player has died.

 

private["_respawnDelay"];
if (!(isMultiplayer)) exitWith {};
"onPlayerKilled - Player was killed..." call ExileClient_util_log;
setPlayerRespawnTime 10e10;
if (ExilePlayerInSafezone) then
{
	call ExileClient_object_player_event_onLeaveSafezone;
};
ExilePlayerInSafezone = false; 
call ExileClient_gui_toaster_removeAllToasts;
_respawnDelay = _this select 3;
_respawnDelay call ExileClient_object_player_death_startBleedingOut;
true

I thought if you could put part of this in the init which would check if a player was dead, you could execute your script after it.

But I have had no luck, anyone have any ideas?

Share this post


Link to post
Share on other sites
playSound "Death";

in description.ext

class CfgSounds
{
    sounds[] = {Death};
    class Death
    {
        name = "Death";
        sound[] = {"\Death.ogg", 1.2, 1};
        titles[] = {};
    };
};

 

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

Just use a default Arma 3 sound
 

playSound "worship";

 

2 people like this

Share this post


Link to post
Share on other sites

Nvm, I was meant to put it in ExileClient_object_player_event_onKilled not ExileClient_object_player_event_onPlayerKilled

Edited by monkeybrain

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.