A very quick but fun tutorial this time: Lets build a trivia game for opensim.
First you will need to download a script and some notecards.
Un-zip the trivia.zip file in a folder on your HD where you can find it.
You will find 6 files in it:
- Trivia Script.lsl <=The actual script that does stuff.
- 5 *.txt files with questions and answers.
Now the most important part of this tutorial.
Create 5 notecards in your inventory and name them like this:
The naming is very important! Do not change the names, don’t use lowercase letters where there should be uppercase letters etc. (Trivia_Brain_1 = Good, trivia_brain_1 = wrong, I think the world explodes if you get this wrong, not sure though.)
Open the trivia text files on your hard drive, and copy and paste the content of these text files in the notecards you have created earlier.
Create a new script in your inventory and name it Trivia Script or, better, Cool-trivia-script-form-this-awesome-website-http-oddy.nl.
Open the trivia script.lsl file with notepad and copy/paste it in the newly created script in your inventory.
Now we have the script and some notecards in our inventory, next thing we should do is build a ‘thing’ that looks cool. So rezz some prims, add particles, a slow prim rotation script, etc, etc. Make a cool looking trivia machine! I used 2 simple bars with sculpted letters in it. (you can find my trivia game in Metropolis on my region Odds Playground, look for Scriptworkz:-) )
If you are happy with your trivia object, link it all together and put the notecards and script in it. And your ready!
The owner can turn the game on or off by touching it.
If you are curious about the syntax, here is a description of the notecard syntax:
category represents a trivia category like Arts or Sciences. This will prefix the question that the trivia engine will ask.
possible answer 1 through possible answer N represent the possible answers that the trivia engine will accept as being valid for the question.
question is simply the question that the trivia engine will ask on the main chat.
There are also some useful comments in the script: read them!