User Tools

Site Tools


placeholder_expression

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
placeholder_expression [2017/06/01 08:50] justinplaceholder_expression [2017/06/01 08:54] justin
Line 2: Line 2:
 ---- ----
  
-**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. These 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.
  
-In regards to usage, the expression must be enclosed using the following syntax, which consists 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:
  
 <code lua> <code lua>
Line 14: Line 14:
 ====Example:==== ====Example:====
 <code lua> <code lua>
-display_message("The value of the property is ${global.property[\"xyz\"]}")+display_message("The value of property ABC is ${global.property[\"ABC\"]}")
 </code> </code>
  
 ~~NOTOC~~ ~~NOTOC~~
placeholder_expression.txt · Last modified: 2021/04/21 20:23 by justin