Lingo Dictionary > S > scriptNum |  |

scriptNum

Syntax

    sprite(whichSprite). scriptNum
    scriptNum of sprite whichSprite

Description

Sprite property; indicates the number of the script attached to the sprite specified by `whichSprite`. If the sprite has multiple scripts attached, `scriptNum` sprite property returns the number of the first script. (To see a complete list of the scripts attached to a sprite, see the behaviors listed for that sprite in the Behavior Inspector.)

This property can be tested and set during Score recording.

Example

This statement displays the number of the script attached to sprite 4:

    put sprite(4).scriptNum

See also

`scriptInstanceList`