Generation

generate functionThu, 27 Jul 2023

Using lsl language create a list of key names that when touch it can add it to a list so later the owner can touch it a can get the list in channel 0

Script //create a list of key names var key1 = ""; var key2 = ""; var key3 = ""; var key4 = ""; var key5 = ""; var key6 = ""; var key7 = ""; var key8 = ""; var key9 = ""; var key10 = ""; //create a list to add the keys to var list = []; //create a function to add the keys to the list function addItem(item){ list.push(item); } //create a function to check if the keys are in the list function checkList(item) { for (var i = 0; i < list.length; i++) { if (list[i] === item) { return true; } } return false; } //create a function to touch the keys and get the list in channel 0 function touch(name){ if (checkList(name)) { llOwnerSay("the key already exists"); } else {

Want to kickstart your project?Use the new AI Studio to create your code