The phrasePushValue native AI script function pushes a value as number on the parameter stack, which is used by ()phraseEndSystemMsg(f, s, s), ()phraseEndNpcMsg(f, s, s), and ()phraseEndSystemMsg(f, s, s) functions.
()phrasePushValue(paramType: s, value: f) // phrasePushValue_sf_
- paramType (string): The type of the parameter. Valid values are: "money", "integer", "time", "skill", "faction", "power_type", "race", "damage_type", "characteristic", "score", and "body_part".
- value (float): The value of the parameter.
()phraseBegin();
()phrasePushValue("money", 15);
()phrasePushValue("integer", 15);
()phrasePushValue("time", 15);
()phraseEndSystemMsg(0, "say", "PHRASE_WITH_3_PARAMETERS");
This example code demonstrates how to use phrasePushValue to push three parameters onto the parameter stack, and then call phraseEndSystemMsg to create a system message with those parameters.
- The value must be a number, and only a few types are handled.
- Some values other than the valid types listed above can be handled if they are the C++ code enum value, but a script function that returns the C++ enum value as int would need to be created.
- The parameter stack must be cleaned before use with ()phraseBegin().
- See also ()phrasePushString(s, s), ()phraseEndSystemMsg(f, s, s), ()phraseEndNpcMsg(f, s, s), and ()phraseEndSystemMsg(f, s, s).