The phraseBegin native AI script function clears the parameters stack, which is used when creating a customized message via ()phraseEndSystemMsg(f, s, s)
, ()phraseEndNpcMsg(f, s, s)
, ()phraseEndSystemMsg(f, s, s)
. It should be called at the start of a phrase if we are not sure that the parameter stack is clean.
()phraseBegin() // phraseBegin__
()phraseBegin();
()phrasePushValue("money", 15);
()phrasePushValue("integer", 15);
()phrasePushValue("time", 15);
()phraseEndSystemMsg(0, "say", "PHRASE_FROM_PHRASE_WITH_3_PARAMETERS");
This example code calls phraseBegin()
to clear the parameters stack, then pushes three values onto the stack with phrasePushValue()
, and finally calls phraseEndSystemMsg()
to create a custom message using the parameters on the stack.