Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Quiz Simple Quiz  

Simple Quiz

A simple quiz to ask questions, get answers and give out a notecard

Category: Quiz
By : Ferd Frederix
Created: 2014-09-24 Edited: 2014-09-24
Worlds: Second Life

the Zip file

Download all files for Simple Quiz
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Notecard.txt
Get file # 2. Simple Quiz.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1 A notecard is given when the quiz is played and won.
2
3 I gave you a choice for it to chat publicly so anyone can hear, or privately. I set it to PRIVATE, IM chat.
4 Here is why: Pairs of people play. They collaborate. And then there is the single player.
5 ( There are always personalities that collaborate, and there are the quiet loners/lurkers). Your system will be used to chat an answer (How many steps...").
6 You do not want to speak this out loud, so I set the default to IM, or Private mode.
7 Then the pairs of people and onlookers either have to collaborate or figure it out for themselves. This is good game design.
8
9 There is another situation where I would use PUBLIC. The entrance . People wil be standing there, wondering what to do.
10 If someone walks into/touches the game start, they can see the chat, and will know what to do.
11 This works great for those loners that will not collaborate and are stuck. And the collaborators will see that their friend figured it out,
12 and be happy for them!
13
14 You didn't say how the prompt is triggered at the very start, so I gave some choices for you. You can do nothing, touch, or collision to get it to prompt you.
15 Just set the variables COLLISION or TOUCH to FALSE or TRUE for the possible ways.
16
17 You can set the TOUCH and COLLISION to FALSE and they have to figure out where to type, and what, somehow else.
18
19 My experience is you need to tell them what to do. Then tell them again. So I gave you these setting to help in different places.
20 Remember that with TOUCH = TRUE, they will still need to know to touch it!
21
22 With COLLISION = TRUE, they can just bump into it, and it will tell them what to do.
23 So I usually start my games with collision, tell them what to do then, and they will know to click things.
24
25 For COLLISION, It works best as an invisible prim, and set COLLISION = TRUE.
26 Make a prim 100% alpha and put it in the pathway so someone will collide with it. Whenever they walk thru it, it chats to them.

Simple Quiz

A simple notecard game with collision, or touch. Itgives a notecard when the question is answered.

Category: Quiz
By : Ferd Frederix
Created: 2014-09-24 Edited: 2014-09-24
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2 //if you touch or collide with the prim that this script is in, it will speak in chat the Prompt "Enter the password".
3 //if they answer "password", it will ask them "How many steps are there leading up to the Elven village from the Queens Castle?";
4 //If they answer "5", it will give them the first notecard it can find in inventory.
5
6
7 integer COLLISION = TRUE; // if set to TRUE instead of FALSE, anyone who walks thru this prim will get prompted for the secret password.
8 integer TOUCH = TRUE; // if set to TRUE instead of FALSE, anyone who touches this prim will get prompted for the secret password.
9 integer IM = TRUE; // if TRUE, they get an Instant Message privately in chat. if FALSE it speaks Publicly.
10 string Prompt = "Enter the password";
11 string SecretWord = "password";
12 string Question = "How many steps are there leading up to the Elven village from the Queens Castle?";
13 string Answer = "5";
14
15 default
16 {
17 on_rez(integer N) {
19 }
20
21 state_entry() {
22 if(COLLISION)
23 llVolumeDetect(TRUE); //make it phantom, and collidable
24 else
26
27 llListen(0,"","","");
28 }
29
30 listen(integer channel, string name, key id, string message) {
31 if(message == SecretWord && ! IM)
32 llSay(0, Question);
33
34
35 else if(message == SecretWord && IM)
36 llInstantMessage(id, Question);
37
38 else if(message == Answer)
40 }
41 touch(integer total_number) {
42 if(TOUCH && ! IM)
43 llSay(0,Prompt);
44 if(TOUCH && IM)
46 }
47 }

Back to the Best Free Tools in Second Life and OpenSim.