AgeClickable

From Alcugs

Jump to: navigation, search

Note: Anything extracted from any Plasma Resource Files is property of Cyan Worlds, Inc. You may not use these assets without recieving written permission from Cyan Worlds, Inc.

Please read this Notice from Cyan about Age Creation before continuing.

Previous: Regions Contents Next: Cameras

Adding Clickables to your age

Clickable objects are objects that call a python file when they are clicked on.They can only be clicked when the avatar is in the associated Click Region, if that is the case, the mouse cursor will become the usual "click" cursor, when it passes over the object.

For an example of an age that has a clickable object, see the PRP Blender Plugin Functionality Check age.

Making the object clickable

NOTE: Make sure you are using a plugin version dated 8/12/06 or later.

First add a clickable region. To do this, use Scripts->Add->PyPRP->Add a Clickable Region (in the Scripts window).

You now have a new click region in layer 2. Place the region around the object you want to make clicakable (the object must be in it!), then resize it so that it is large enough to encompass your avatar as well as the object.

Next, we must tell the plugin that this object is clickable, and links to a python file:

Select the object you want to make clickable and open the logic properties tab (in the Buttons window).

Add the following property:

string "clickfile" value "[python file to link to]"

Set the value to the name of the Python file containing the script for handling the click, but do not specify the .py extension.
For example, if your Python file is named "ButtonHandler.py", then set the value of the "clickfile" property to just "ButtonHandler"

That should look somethin like this:
Image:clickfile_property.jpg


NOTE: If your clickable object is not inside the clickable region, then Blender will report an error upon export.

Creating the python file to link to

To be done

Previous: Regions Contents Next: Cameras
Personal tools