The isPlayerAlived native AI script function tests whether a player with the given entity ID is alive.
(success: f)isPlayerAlived(playerId: s)
($botIndex)getBotIndexByName("boss_3");
($playerId)getCurrentPlayerAggroListTarget($botIndex):
(alived)isPlayerAlived($playerId);
if (alived == 1.0f) {
// do something
}
This example code checks whether the player targeted by the bot named "boss_3" is alive, and executes code if they are.