Adding scripts to an object

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.

Drag and Drop the script from your Inventory

To add scripts using the drag and drop method from your Inventory:

  1. 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. 
  2. Select the script from your Inventory and drag the script to the object. 
  3. 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.
    propertiesbutton.png
    Click the Properties button on the object menu.
  4. At the bottom of the object's Properties panel is a Script Settings section. From there, you can edit the script's parameters. 
apply_a_script.png
Drag and drop a script onto an object in the scene. 


Adding the script from the Scene Objects panel

To add scripts via the Scene Objects panel, see adding scripts in Object Editing

For more information on scripts, see Working with scripts.

 

Was this article helpful?
3 out of 3 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.