The scripts are txt files with LSL code, archived together in .zip files. For each one we provide a description with instructions and explanations on how they work. For more details about the LSL language visit the LSL Portal
The Presentation Panel
This object is mainly used to display the theory. The user can use the buttons to navigate the slides.
The main script, located inside the root object along with the slides/textures of the presentation, can be found in ‘mainScript.txt’. It waits for messages (link_message) from the buttons to change the language or navigate to another slide. This is done by using llSetTexture to change the texture. We also use the listen event so we can change the language from other objects and the timer event so the presentation will reset to the first slide if some time has passed without any interaction.
The individual buttons communicate with the root prim using llMessageLinked. The folder includes the script for one of the language buttons (language-button.txt), and the script for one of the navigation buttons (nextButton.txt).
The HUD Object
The HUD object is equipped by the avatar and appears on the top right section of their screen, displaying messages from NPC characters and the Game. It also stores information about the user’s progress in the 3D World.
The first step is for the avatar to receive the HUD. We have used separate buttons for each language. The script used for one of these buttons can be found in ‘hud-giver.txt’. It uses llGiveInventory to give the HUD object when the user clicks the button (touch_start).
The main script located in the root prim of the HUD object is located in ‘dialogue-hud.txt’. It waits for messages from other objects (listen event) and also from the HUD Buttons (link_message event). The main use of these messages is to change the currently displayed textures and show the suitable number of answer buttons. The textures are inside the HUD object. It receives the number of the slide that should be displayed. There is notecard file ‘hud-data.txt’ that links each slide with a specific image displayed next to it (a photo of the NPC character or the logo of the game), the number of the answer buttons that should be displayed and the target channel that the answer should be sent to (each NPC listens to a specific channel).
The script for one of the option buttons can be found in ‘optionButton.txt’. The script for the red button on the top right of the HUD, can be found in ‘hideButton.txt’. These buttons just send a message to the root prim object using llMessageLinked.
The first NPC character of the game has a short discussion with the user.
The script can be found in ‘npc.txt’. The NPC uses the sensor event to check if a user is nearby and the touch_start event so the avatar can initiate the dialogue as well.
In our implementation the NPC sends and receives messages from the HUD object equipped by the user. The NPC sends the information about which slide/texture should be displayed in the user’s HUD screen.
You just put this script in a simple prim object and it will generate the NPC character. The prim object uses a timer event to check periodically for the NPC’s location and move there (it follows him when he moves around). The prim object should be transparent and large enough, to cover the NPC model, so the user can easily click on it.
Speaking with the NPC, will cause him to ride the Traktor and drive a specific route around the farm.
The script of the npc is ‘npc.txt’. It waits for messages from the users HUD object (listen event). The avater can be set to ride the tractor with the osNpcSit command.
The script for the tractor can be found in ‘’. It waits for messages (listen event) to start or stop. Once it starts, there is a timer event that periodically causes the vehicle to move towards the current target position (using llVecDist and llVecNorm). It also checks if the destination has been reached and sets the next target position.
The scarecrow, located inside the haunted barn offers two activities to the user.
The first activity is a simple quiz and this is part of the dialogue with the scarecrow NPC. The script can be found in ‘scarecrow.txt’.
When the user completes the quiz, the scarecrow offers a second activity. This activity is generated using the llRezObject command. This command generates the objects related to this activity: 3 boxes and a card. The script of the root prim of this activity can be found in ‘boxes-main.txt’. It can set the texture for the card object accordingly. It waits from messages from the boxes and if the correct box has been selected, it sends a message to the card object to make it move inside the box.
The script for one of the three objects can be found in ‘boxes-box-button.txt’. It just sends a message to ROOT, to notify that the user has selected this box.
The script for the card can be found in ‘boxes-card-button.txt’. It just waits for a message from ROOT and then it will move to one of the three boxes (llSetPos) while playing a success sound (llPlaySound).
Wiseman in Corn Maze
In the center of the corn maze, there is an NPC character. The script for this NPC can be found in ‘wise-man.txt’.
There is also a box nearby. When the user clicks on this box, a number of posters appear throughout the maze. The script for this box can be found in ‘posters-box-main.txt’.
The user must find and click each one of these posters.
The script of one of the poster objects can be found in ‘poster.txt’. It sends a message to the main box that keeps track which posters have been collected. The poster is displayed or hide using llSetAlpha and it also rotates when it is clicked to show the face of the object with the poster text.
In this activity the user speaks with an NPC and then plays a small game. They have to select the correct folder that the NPC asks, then read a presentation and they receive a puzzle piece.
The NPC script is located in ‘npc.txt’. The script used in one of the folders so the user can select one of them can be found in ‘folder.txt’.
The script for one of the presentation panels can be found here ‘presentation-panel.txt’. It has been modified to check if the final slide has been reached and send a message to notify the other objects.
Finally, each piece of the puzzle is initially hidden and waits for the user to collect it and click on the puzzle panel. The script for one of them can be found in ‘puzzle-piece.txt’.
The ORGA Village activity
For this activity there are a number of cards and each one corresponds to a quiz question for the user.
The script for one of the cards can be found in ‘card.txt’.
The script for the help button located next to the activity can be found in ‘help-button.txt’. When the user clicks this button, it sends a message to the presentation panel (script can be found in presentation-panel.txt next to it) and it will go to the specific child related to the current question/card.
The Drone can be remotely controlled. The main script, located in the root prim of the Drone, is ‘drone.txt’. It waits for messages (listen event) and then uses either llSetPos (to move around) or llSetLocalRot (to rotate)
The individual helix blades are part of the linked object and have a script that causes them to rotate. The script can be found in ‘helix-rotation.txt’. They wait for a message from the root prim to start or stop rotating with llTargetOmega.