User Guide
536 Chapter 12: Methods
This command is similar to the setaProp command, except that setProp returns an error when
the property is not already in the list.
Parameters
property
Required. A symbol (Lingo only) or a string that specifies the property whose value is
replaced by
newValue.
newValue Required. The new value for the property specified by property.
Example
This statement changes the value assigned to the age property of property list x to 11:
setProp x, #age, 11
Using the dot operator, you can alter the property value of a property already in a list, exactly as
above:
x.age = 11
See also
setaProp
setScriptList()
Usage
spriteReference.setScriptList(scriptList)
sprite(whichSprite).setScriptList(scriptList)
Description
This command sets the scriptList of the given sprite. The scriptList indicates which scripts
are attached to the sprite and what the settings of each script property are. By setting this list, you
can change which behaviors are attached to a sprite or change the behavior properties.
The list takes the form:
[ [ (whichBehaviorMember), " [ #property1: value, #property2: value, . . . ] ",
[(whichBehaviorMember), " [ #property1: value, #property2: value, . . . ] " ] ]
This command cannot be used during a score recording session. Use setScriptList() for
sprites added during score recording after the score recording session has ended.
Parameters
scriptList
Required. Specifies the script list for a given sprite.
See also
scriptList, value(), string()
settingsPanel()
Usage
-- Lingo syntax
spriteObjRef.settingsPanel({integerPanelIndex})
// JavaScript syntax
spriteObjRef.settingsPanel({integerPanelIndex});