This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
placeholder_expression [2020/07/30 09:41] – justin | placeholder_expression [2021/04/11 20:28] – justin | ||
---|---|---|---|
Line 3: | Line 3: | ||
**Placeholder expressions** provide a way to insert dynamic values into [[string|strings]] that will get evaluated at game runtime. Examples of supported values include entity properties, global properties, and arithmetical expressions. Placeholder expressions are currently only supported by the [[Display Message]] function. | **Placeholder expressions** provide a way to insert dynamic values into [[string|strings]] that will get evaluated at game runtime. Examples of supported values include entity properties, global properties, and arithmetical expressions. Placeholder expressions are currently only supported by the [[Display Message]] function. | ||
+ | |||
+ | <WRAP center round info 100%> | ||
+ | Since placeholder expressions are parsed at game time, they should be used sparingly to prevent potential slowdowns or hesitations during the execution of a [[script]]. When possible, it is recommended to store the expression into a variable and then use string concatenation to insert the value into a [[string]]. | ||
+ | </ | ||
In regards to usage, the expression must be enclosed using the following syntax consisting of a dollar sign and curly braces: | In regards to usage, the expression must be enclosed using the following syntax consisting of a dollar sign and curly braces: |