Adding A Property To A Lingo Script

You may need to add a parameter to lingo script so that you can easily make adjustments to your sprites in Director.  This procedure should walk you through quickly adding a parameter:

  1. Select the sprite that you would like to edit, then in the property inspector, select the Behavior tab, then right click on the behavior to edit and select Script from the menu.

Select Script in Property Inspector

  1. In the script, create a property name for your new behavior.  In this example, I used pTestProperty.

Example of Adding A Property To Director

  1. Now add an on getpropertydescritionlist similar to the following:

getpropertydescriptionlist example

You now will be able to re-use this behavior with parameters as shown below:

Testproperty example

Note that for format you can use things such as string, integer, boolean and then set the default value in your default property.  Please let me know if you need any help with this or have questions.


Tags: , ,

Leave a Comment

Spam protection by WP Captcha-Free