-
Notifications
You must be signed in to change notification settings - Fork 94
is_bot_alived
Ryzom Core Wiki edited this page Jul 8, 2024
·
3 revisions
title: Is Bot Alived description: published: true date: 2023-03-16T23:08:21.007Z tags: editor: markdown dateCreated: 2023-03-16T22:25:19.545Z
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 (float): The index of the bot.
- success (float): Returns 1.0 if there is at least one member of the group alive, or 0.0 if no living bot is found.
($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.