-
Notifications
You must be signed in to change notification settings - Fork 94
phrase_end_system_msg
title: Phrase End System Msg description: published: true date: 2023-03-16T23:09:15.174Z tags: editor: markdown dateCreated: 2023-03-16T22:26:25.840Z
The phraseEndSystemMsg AI script function is used to send a message with parameters through a system broadcast message. The parameters are taken from the parameter stack created by phrasePushValue
and phrasePushString
functions.
Because the message can be sent as "around", the broadcast message must be sent by a bot that has a valid position. {.is-info}
phraseEndSystemMsg(botIndex: s, sayType: s, phraseIdentifier: s) // phraseEndSystemMsg_fss_
-
botIndex (string): The position of the bot in the group. See
getBotIndexByName
function. -
sayType (string): The type of the say dialog. Possible values are:
"say"
,"shout"
,"civilization"
,"territory"
,"universe"
,"arround"
,"system"
, and"region"
. - phraseIdentifier (string): The identifier phrase as seen in phrase_wk.uxt.
The function uses the parameter stack created by phrasePushValue
and phrasePushString
functions.
()phrasePushString("literal", "Test des levels designer");
()groupOf5Bot.phraseEndSystemMsg(4, "say", "PHRASE_TOTO");
In this example code, a string is pushed onto the parameter stack using phrasePushString
, and then the phraseEndSystemMsg
function is called to send a system broadcast message.
In the phrase_wk.txt
, the PHRASE_TOTO
must be defined as follows to take the literal as a parameter.
PHRASE_TOTO(literal l)
{
[$l$]
}
The first parameter is not automatically set to the bot that sends the system message as in phraseEndNpcMsg
.