Terra Project - Scripting & Documentation
This page is a resource to support scripting for Terra specifically as well as for Second Life in General. For basic overviews of Scripting in Second Life and resources on LSL (Linden Scripting Language) check out the resources section of the main Second Life page. The documentation will be broken up into the following scripted objects: Voting Box, Survey, Ideology Test, and Tax Box.
This script allows the owner to supply a number of political parties and when anyone else "touches" the scripted object they will be asked to vote for one of the parties. Each avatar is only allowed to vote once and all of the voting results are displayed to the scripted object's owner when they "touch" the object. This script is Highly Customizable and can be dropped into any prim in order to allow voting on "touch". Simply follow the step-by-step instructions inside the script to edit the number and names of political parties.
This script asks any users that "touch" the scripted object a survey of ten questions and keeps track of the average response for each question. Responses range from strongly agree (value of 2) to strongly disagree (value of -2). Each avatar can only ask once and the results are displayed to the scripted object's owner upon "touch". This script is highly customizable and can be dropped into any object. It also requires two textures be in the object's inventory as well to be displayed when the survey is on or off. Simply follow the step-by-step instructions included in the script to edit the questions and textures used.
This script will charge any avatars that "touch" it a given amount of Linden in taxes. This money is then payed directly to the scripts owner who must then be responsible for distributing it through the Terra government. Each avatar can only pay the taxes once, after which any money that they pay will be immediately refunded to them. When the owner of the script "touches" the scripted object the total amount of linden that have been collected in taxes is displayed as well as a list of the names of all of the avatars that have payed taxes. This script can be dropped into any prim to create a tax box and it is easily customized by changing the one variable that dictates how much to charge for taxes.
This script will present any avatar that touches it with a series of 24 political questions in dialogue boxes one at a time. After answering all 24 questions the avatar is given a color coded halo to wear depending on the answers to the various questions. This script is actually broken up into 3 different scripts due to size and memory limitations imposed on all LSL scripts. All 3 scripts plus two textures (for questionnaire OFF and ON status) and the 66 different colored Political Indicator objects must all be in the inventory of the ideology test object for the overall "script" to work. The twelve economics-related questions are located in the Economics Questions script and the other 12 Social-related questions are located in the Social Questions script. The Political Form script initiates the test when the object is first touched and sends messages back and forth with the other scripts to ask the questions as well as to give the avatar the correct colored political indicator at the end of the questionnaire. Because of this the script is not very easy to customize, the only things you might want to change would be the actual questions, although they would have to be similar questions to the ones being replaced, otherwise different values for the answers might need to be applied. !!!Do not edit code unless you absolutely have to or you know what you are doing!!!