-
Notifications
You must be signed in to change notification settings - Fork 94
get_current_speaker_eid
Ryzom Core Wiki edited this page Jul 8, 2024
·
7 revisions
title: Get Current Speaker EId description: published: true date: 2023-03-16T23:07:12.053Z tags: editor: markdown dateCreated: 2023-03-16T22:23:49.034Z
The getCurrentSpeakerEid native AI script function gets the EntityId of the bot at which the player is clicking at.
This function is only valid when called from a
player_target_npc
event. {.is-warning}
(botEidAsString: s)getCurrentSpeakerEid()
- botEidAsString (string): The EntityId of the bot as a string.
($botEid)getCurrentSpeakerEid();
($playerEid)getCurrentPlayerEid();
phrasePushString("player", $playerEid);
phrasePushString("bot", $botEid);
(index)getBotIndex($botEid);
phraseEndEmotMsg(index, "EMOT_PLAYER_INSULT_BOT");
This example code gets the EntityId of the bot clicked by the player and uses it in a chat message.
-
getCurrentPlayerEid
: Returns the Entity ID of the player that is clicking on a bot.