The isBotAlived native AI script function is used to test if a bot of the current group is alive, identified by its index.
(success: f)isBotAlived(botIndex: f) // isBotAlived_ff
($botIndex)getBotIndexByName("boss_3");
($alive)isBotAlived($botIndex);
if ($alive == 1.0f) {
// do something if the bot is alive
}
This example code retrieves the index of a bot named "boss_3" and tests if it is alive. If the bot is alive, the code block is executed.