Add/edit instance variable dialog
The Add/Edit Instance Variable dialog allows you to set the name, type and initial value for an instance variable in an object type or family.
The dialog has the following fields.
- The name identifies the instance variable. This is typed in to expressions after the object name (e.g.
Sprite.MyVariable) to retrieve the value of the instance variable. Some names cannot be used if they conflict with the names of the object's other expressions or behaviors.
- The type specifies what kind of value the instance variable holds. This can be Number, Text (also known as a string), or Boolean (an on/off value). The type of an instance variable does not change - you can't store text in a Number variable and vice versa. Also note that once you create events that use this variable, its type cannot be changed, since that could make the events invalid.
- Initial value
- The initial number for a Number variable, the initial text for a Text variable, or a checkbox for a Boolean variable to specify if it is initially true (checked) or false (unchecked). Note that unlike expressions, the initial text entered here does not need double quotes around it. In other words, Hello is a valid entry, and if you enter "Hello" (as you would in an expression) the initial string will include the double quotes.
- Description Optional
- An optional comment you can use to briefly describe what the variable is used for. It is displayed in the Properties Bar description panel when the instance variable's property is selected.
Construct 3 Manual
You are here:
Search this manual:
This manual entry was last updated on 18 Aug, 2017 at 23:13