- DEBUG
- Set DEBUG to 1 to show some status to the owner while you test it. Normally you want this to be DEBUG 0
- OBJECT_NAME
- Normally the naming of the object is generic and generated by the script, but you can over ride it here. This lets you keep several in your inventory: OBJECT_NAME Riddle 1
The Question and Answers
- QUESTION
- Everything that follows is the question to be asked such as:
QUESTION I am the Guardian of the Desert Sands. What is my name?
- ANSWER
- You can provide any number of correct answers
ANSWER Jinn
ANSWER Set
ANSWER Djinn
ANSWER Azazel
ANSWER Lilith
- ANSWER_KEYWORDS
-
Keywords are another way to detect a correct answer. You provide a list of up to 4 words (separated by spaces).
Each of the words listed MUST be present in the response, but they can be in any order or have other words in between them.
You can include up to FOUR keywords
So for "ANSWER_KEYWORDS Freddy Great" --- responses such as "freddy the great", "the Great Freddy", or "the great big fat Freddy" would be accepted.
If you include ANSWER_KEYWORDS, they will be checked before any of the specific answers using the ANSWER keywords.
- WRONG_ANSWER_RESPONSE
- This is the response to an incorrect answer such as: WRONG_ANSWER_RESPONSE That is wrong! I'm going to sleep now
- SLEEP_SECONDS_AFTER_WRONG_ANSWER
This is how long to sleep before interacting with someone else:
SLEEP_SECONDS_AFTER_WRONG_ANSWER 10
- CORRECT_ANSWER_RESPONSE
- This is said when a correct answer is provided:
CORRECT_ANSWER_RESPONSE You may pass. \n But be careful not to harm any of my creatures.
You can use new lines ( \n ) to provide spacing in the chat window
Actions for Correct Answers
- CORRECT_ANSWER_GIFT
- You can give something in the object's contents:
CORRECT_ANSWER_GIFT DE Dance Hoop v1.0 DEMO
Be sure to spell it correctly including internal spaces
You can give several gifts. They can be notecards, objects or textures. Just include them in the object contents and add a CORRECT_ANSWER_GIFT line for each one.
- CORRECT_ANSWER_TELEPORT
- Teleport the person to the specified location:
CORRECT_ANSWER_TELEPORT 100 100 100
The location must be in the same region
- WAIT_FOR_ANSWER_SECONDS
- This is the time to wait for a person to answer the question:
WAIT_FOR_ANSWER_SECONDS 15
During this time, no one else can interact with the object.
- SAME_GROUP
- This restricts usage to avatars in the same group as the object : SAME_GROUP 1
- Set to SAME_GROUP 0 to allow anyone to interact with it
- Note that you don't specify the group name here. just a 1 or 0 to enable/ disable it.
- The group comparison is between the Avatar's group and the object's group.
- Set the group for the object on the General Edit Tab.
- SENSOR_INTERVAL_SECONDS
- If TOUCH_REQUIRED is zero, SENSOR_INTERVAL_SECONDS is how often the script checks for someone nearby within DISTANCE.
You don't want this too short as it just burns scripting cycles in the simulator.
- DISTANCE
- DISTANCE controls how close someone needs to be to the object to interact with it. The value can be between 1 and 20 meters
- REQUIRE_TOUCH
- Use REQUIRE_TOUCH 1 to require users to touch the object in order to be asked the question
With REQUIRE_TOUCH 0, anyone that is within the specified DISTANCE is asked the question.
The DISTANCE keyword then controls how close someone needs to be to automatically be asked the question
- TOUCH_TOO_FAR_DISTANCE
- When REQUIRE_TOUCH is set to 1, TOUCH_TOO_FAR_DISTANCE specifies the distance WITHIN which they will be told "Come closer".
This prevents people from interacting with it from far away.
- DETECT360
- With DETECT360 0, you can have interaction from only in front of the object.
Which might be good if you want a shortcut through a maze that only works from one side of the wall.
"Front" in this case means in front of the forward X axis of the object to be detected. Not behind or to the side.
() To see the forward X axis: edit the object and select "Local" for axis display.
With DETECT360 1, interaction can occur from any side of the object.
- PHANTOM_SECONDS
- With PHANTOM_SECONDS 0, the object will just response to a correct answer with a message.
But when PHANTOM_SECONDS is greater than zero, the object will turn phantom for this number of seconds, allowing someone to walk through it.
- ONLY_ONE_PERSON_PASSES
- With "ONLY_ONE_PERSON_PASSES 1", and PHANTOM_SECONDS is not zero, the object will turn solid again as so as the first person goes through.
- TURN_TRANSPARENT_SECONDS
- With "TURN_TRANSPARENT_SECONDS 0", the transparency of the object is not changed. So you can set full or partial transparency of any face and the script will not change anything.
Otherwise
- This will turn one or more sides of the object Transparent.
- This is independent of the PHANTOM effect, but you will probably want it to be the same..
- NOTE: If ONLY_ONE_PERSON_PASSES is set to 1, transparency will be turned off when the 1st person passes through.
- If DETECT360 is set to 1, the entire object will turn transparent.
- If DETECT360 is set to 0, you will need to specify the Face(s) you want to turn transparent.
- If no faces are specified the default is Face 2, which is the forward facing X axis for a cube.
- TRANSPARENT_FACES
- Use this keyword to specify the object's faces you want to turn transparent when the correct answer is given:
"TRANSPARENT_FACES 2", or "TRANSPARENT_FACES 2 3 5"
The default is "2" which is the face on the forward X axis of a cube.
Right-click on the object and select Edit from the pie chart menu.
- In the Build window, check the "Select Face" box.
- Then click on a specific part of the object.
- It's face will be shown below the selection options as "Faces: n".
Then add the face numbers (separated by spaces) to the keyword: TRANSPARENT_FACES 2 3 6