The isAlived and isGroupAlived native AI script functions check if the group is alive. They return 1 if the group is spawned and at least one member of the group is alive.
(alive)isAlived(); // isAlived__f
(alive)isGroupAlived(); // isGroupAlived__f
($alive)isAlived();
if ($alive == 1.0f) {
debug("At least one member of the group is alive!");
}
This example code calls the isAlived function and stores the result in the $alive variable. If at least one member of the group is alive, it prints a debug message.
($alive)isGroupAlived();
if ($alive == 1.0f) {
debug("At least one member of the group is alive!");
}
This example code calls the isGroupAlived function and stores the result in the $alive variable. If at least one member of the group is alive, it prints a debug message.
The isGroupAlived function is an alias of isAlived.
This function is used to determine if the current group is alive and can be interacted with. If the group is not alive, some functions that depend on a spawned group may not work correctly.
The isBotAlived function can be used to determine if a specific bot in the group is alive.