Difference between revisions of "Scripts"
Jump to navigation
Jump to search
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 | |||
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 = | |||
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 == | |||
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 = | |||
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 = | |||
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. | ||
* '''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. |
Revision as of 22:33, 11 July 2015
When a script can be attached to an entity you will see a dialog similar to the one shown below.
- If a script has no properties or its properties have not been given values, its name will be prefixed with a "+" (as shown above)
- After the script's properties are set, it's icon changes to a combination pencil and "+" ().
- Since most scripts have properties that must be set before the script will function properly, these icons help to remind the user when the properties haven't been set.
Add
Used to create a new script or add a previously created scripted.
- Filter: Text entered into this field will limit the list of scripts displayed to those whose name contains the given text
- [New Script]: Appears at the top of the list of scripts and is used to create a script from scratch. See below for more details.
- Show Hidden Scripts: Shows scripts that have been marked as hidden.
- If you create a script outside of the tool, it will not appear in the list of scripts.
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.
- Name: The name of the new script. This name will be used to refer to the script from elsewhere and is used as the name of the script's source file.
- Extends: The name of parent script from which this script will be derived. Creation Kit will usually set this to a reasonable default.
- Hidden: Adds the hidden flag to the script's definition.
- Conditional: Adds the conditional flag to the script's definition.
- Documentation String: Documentation explaining the script's purpose.
Remove
Removes the currently selected script from the list of scripts. The source file is not deleted.
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.
- Add Property: Adds a new property to the script.
- 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.
- Revert: TBD
- 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.