While Forge knows how to parse property expressions, it does not know about the host-specific objects and how to ask them for their properties. So it assumes that the instructions for that will be defined by the host as defined by the constants and global declarations in "LEOPropertyInstructions.h". To register these properties at startup, call:
LEOAddInstructionsToInstructionArray( gPropertyInstructions, LEO_NUMBER_OF_PROPERTY_INSTRUCTIONS, &kFirstPropertyInstruction );
Forge will then use kFirstPropertyInstruction to offset all the instruction IDs as needed when generating code for a property expression.
This instruction pushes a reference to the object owning the current script onto the stack. It implements the 'me' object specifier for Hammer.
Push the value of a property of an object onto the stack, ready for use e.g. in an expression. Two parameters need to be pushed on the stack before calling this and will be popped off the stack by this instruction before the property value is pushed:
propertyName - The name of the property to retrieve, as a string or some value that converts to a string.
object - The object from which to retrieve the property, as a WILDObjectValue (i.e. isa = kLeoValueTypeWILDObject).
Change the value of a particular property of an object. Three parameters must have been pushed on the stack before this instruction is called, and will be popped off the stack:
propertyName - The name of the property to change, as a string value or value that converts to a string.
object - The object to change the property on. This must be a WILDObjectValue (i.e. isa = kLeoValueTypeWILDObject).
value - The new value to assign to the given property.