Difference between revisions of "Scripts"

29 bytes added ,  23:33, 11 July 2015
m
no edit summary
imported>Bug64
(Created a page on the Script management dialogues, mostly to serve as a placeholder for usages notes.)
 
imported>Bug64
m
Line 1: Line 1:
When a script can be attached to a game element you will see a tab or portion of a tab with a window similar to the one shown below.
 
When a script can be attached to an entity you will see a dialog similar to the one shown below.


[[File:ScriptManagement.jpg]]
[[File:ScriptManagement.jpg]]
Line 8: Line 9:




== Add ==
= Add =
Used to create a new script or add a previously created scripted.   
Used to create a new script or add a previously created scripted.   


Line 20: Line 21:
* If you create a script outside of the tool, it will ''not'' appear in the list of scripts.
* If you create a script outside of the tool, it will ''not'' appear in the list of scripts.


=== Add New Script ===
== Add New Script ==
Prompts the user for basic information used to create the script header.  With the exception of the name, any of this information can be changed later by directly editing the script's source.
Prompts the user for basic information used to create the script header.  With the exception of the name, any of this information can be changed later by directly editing the script's source.


Line 31: Line 32:
* '''Documentation String''': Documentation explaining the script's purpose.
* '''Documentation String''': Documentation explaining the script's purpose.


== Remove ==  
= Remove =
Removes the currently selected script from the list of scripts.  The source file is not deleted.
Removes the currently selected script from the list of scripts.  The source file is not deleted.


== Properties ==
= Properties =
Used to add properties to a script and set their values.  After a property has been added, it must be removed by deleting it from the script's source.
Used to add properties to a script and set their values.  After a property has been added, it must be removed by deleting it from the script's source.
[[File:PropertiesDialogue.jpg]]
[[File:PropertiesDialogue.jpg]]


* '''Add Property''': Adds a new property to the script.   
* '''Add Property''': Adds a new property to the script.   
** The property will appear at the bottom of the script.
** If you mark the property hidden, it's still added to the script but will not appear in this window
* '''Auto-Fill All''': ''TBD''
* '''Auto-Fill All''': ''TBD''
* '''Edit Value''': Allows you to set the initial value of this property.  The area to the left of the button will provide one or more input fields to be populated, depending on the property's type.
* '''Edit Value''': Allows you to set the initial value of this property.  The area to the left of the button will provide one or more input fields to be populated, depending on the property's type.
Line 46: Line 45:
* '''Auto-Fill''': Like "Auto-Fill All" but only fills the selected property
* '''Auto-Fill''': Like "Auto-Fill All" but only fills the selected property


== Add Property ==
Adds a new property to the script. New properties will appear at the bottom of the script.
[picture goes here]


* If you mark the property hidden, it's still added to the script but will not appear in this window
* It is possible to create illegal properties using this dialog (such as using an invalid name for a property).  This will be reported as a compilation error after clicking the OK button on the Add Property dialog.  When the compilation error dialog is dismissed, the bad property will not appear in the list of properties even though it is still in the script.  You must edit the script's source to resolve the issue.
* It is possible to create illegal properties using this dialog (such as using an invalid name for a property).  This will be reported as a compilation error after clicking the OK button on the Add Property dialog.  When the compilation error dialog is dismissed, the bad property will not appear in the list of properties even though it is still in the script.  You must edit the script's source to resolve the issue.
Anonymous user