======Set Global Property====== ---- Sets a custom [[global_properties|global property]] to the specified value. This property can then be referenced elsewhere, for example when evaluating a condition. When editing this function in the [[Script Editor]], the [[Variable Expression Builder]] provides an easy way to choose which value you'd like to assign to the property. These properties can also be given values via [[script_syntax|assignment statements]] (i.e. the "Assign Value" visual [[script]] node) or even pre-defined with initial startup values from the [[Global Properties]] tab in your [[Game Configuration]]. ====Signature:==== set_global_property(property_name, property_value) ^Argument^Description^Type^Required^ |property_name|Name of the property.|[[String]]|Yes| |property_value|Value that will be assigned to the property.|[[String]], [[Number]], [[Boolean]]|Yes| You can also store properties that are specific to a [[tile]], [[object]], or [[character]]. For more information, see [[Set Entity Property]]. ====Example:==== set_global_property("keys", global.property["keys"] + 1); //Results:// The [[global_properties|global property]] "keys" (a counter being used to track the number of keys collected) is incremented by one. Use the **Set Global Property** function to store and keep track of game-level information such as the current chapter/act of the story, the player's score, or other custom statistics. ---- ====Editor Node:==== {{:wiki:set_global_property_node.png?nolink|}} ====Visual Demo:==== {{:wiki:set_global_property_demo.gif?nolink|}} ~~NOTOC~~