You can add scripts to objects in order to make them perform actions or interact with avatars and the environment. When scripts are added to an object, they become part of the object as that object's component. Currently, there are two ways to add a script component to an object:
|Note: Some scripts require the object to be dynamic in order to properly track collision events. For more information about dynamic objects, see Making an object dynamic.|
To add scripts using the drag and drop method from your Inventory:
- In Edit Mode, choose an object you want to apply the script to. It can be an existing object in the scene or a new object from your Inventory. If you wish to add the script to a new object, drag that object into the scene.
- Select the script from your Inventory and drag the script to the object.
- Now that the script has been applied to the object, open the properties panel for the object. Select the object and click the Properties button to open the properties panel.
Click the Properties button on the object menu.
- At the bottom of the object's Properties panel is a Script Settings section. From there, you can edit the script's parameters.
|Drag and drop a script onto an object in the scene.|
To add scripts via the Scene Objects panel, see adding scripts in Object Editing.
For more information on scripts, see Working with scripts.