-
Posts
2 -
Joined
-
Last visited
Content Type
Forums
Blogs
Knowledge Base
Posts posted by TomixDragoon
-
-
Hello, I am Tomix, and I am new to scripting LSL. I was wondering how I would be able to create a touch limit on an Object. The Limit being one, I already have the object playing a sound and increasing a count by one per click, sort of like signing a guestbook.
vector color = <0.5, 1.0, 1.0>; string default_text = "//default_text// \n "; string text; string sound1 = "sound1"; //uuid or name of item in inventory string sound = "sound"; //uuid or name of item in inventory integer count=0; default { state_entry() { text = default_text; llSetText(text, color, 1.5); llTargetOmega(<0,0,.2>,PI,1.0); } touch_start(integer total_num) { llTriggerSound(sound1, 2.0); llTriggerSound(sound, 2.0); } touch_end(integer number) { count = count + 1; text = (string)count + "//new_text// \n"; llSetText(text, color, 1.5); } }
Requesting Assistance Touch Based Script
in LSL Scripting
Posted
Taking into account the sound, thank you Rolig, I want it the device to record someone who touches it, and if they touch it again it doesn't increase the counter again or play the noise again.