phrase_begin - ryzom/ryzomcore GitHub Wiki


title: Phrase Begin description: published: true date: 2023-03-12T19:14:29.199Z tags: editor: markdown dateCreated: 2023-03-12T19:14:26.346Z

phraseBegin

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.

Syntax

()phraseBegin() // phraseBegin__

Examples

()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.

⚠️ **GitHub.com Fallback** ⚠️