The getBotEid native AI script function is used to get the bot entityId by its index in the group.
(botEid: s)getBotEid(botIndex: f) // getBotEid_f_s
(index)getBotIndexByName("bot_toto");
($botEid)getBotEid(index);
if (index != -1)
{
()phrasePushValue("entity", $botEid);
()phraseEndEmoteMsg(index, "PHRASE_YOUR_ARE_CLICKING_ON_ME");
}
This example code gets the bot index by its name and then gets its entityId in the group using the getBotEid
function. If the index is not -1 (meaning the bot is in the group), it pushes the entityId on the parameter stack and ends an emote message with the phraseEndEmoteMsg
function.