Door
- Details
- Parent Category: Ultimate Change Link
- Created on Friday, 20 May 2011 13:41
- Last Updated on Wednesday, 11 September 2013 14:40
- Published on Friday, 20 May 2011 13:41
- Written by sandrine
- Hits: 169
In this example we animate a door
Setup step
First create a door :

There are 3 linked prims. The root is the lower one on the ground.
Drop the script "child" in the central prim that must move.
Drop the scripts :
- setup manager
- setup pos
- setup scale
in the root prim.
Clic on door, you get this menu :

Put door in first pos and scale and click on button "Add". You get this menu :

You can see there is now a frame (Frame 1/1) and new buttons. Put door in new position/scale :

Click again on button "Add". You get this menu :

You can see there are now 2 frames (Frame 2/2). Continue to add frames... For example i created 6 frames (set more frames to get a more fluid move) :

You can browse frames with buttons "Previous", "Next", "First" :

You know the current frame with the text menu : "Frame 5/6". First number is the current frame and second number total frames number.
You can also play all frames with button "Play". You get a new menu to control speed :

Click on stop to get back the main menu.
You can change a frame and save new position and rotation with button "Save".
You can insert a new frame before he current frame with button "Ins".
You can delete the current frame with button "Del".
When all is good click on tha button "Dump move". You get informations in chat :

Copy and paste them in a notecard called "configmove" :

You can clean text for no needed informations. At least click on "End Setup" button to del all setup scripts.
Action step
Now drop in root prim :
- notecard "configmove" that you just created
- script "move pos"
- script "move scale"
- script "trigger sensor"

Wait for scripts to load notecard.
Now you must change parameters in script "trigger sensor" to make it work as you want. Open the script with a double click on its name.
You can see there are many parameters all full commented for all situations.
We want movement to start on sensor detect so this parameter must be TRUE.
We want movement to stop when no sensor so this parameter must be TRUE.

We want a range of 3 meters and detect in a sphere :

We want a list mode with all frames :

We want no ping, no loop, but reset and back animation :

At least we set time parameters :

When you save the script "trigger sensor" you start again reading notecard for scripts "move pos" and "move scale", because inventory has changed. Wait for end of reading.
All is good now. You can enjoy your door :

The door open when an avatar is detected in a range of 3 meters and close when no avatar is in this range.

