Error403Forbidden Posted July 24, 2020 Share Posted July 24, 2020 Hello! I want to make a little chime for when people walk into my Cafe. I have the sound uploaded to SL, i just can't figure out the script. What i'd like, is when people walk through a phantom prim, it will play the bell sound once. Link to comment Share on other sites More sharing options...
Fenix Eldritch Posted July 24, 2020 Share Posted July 24, 2020 Essentially, you want to play the sound on a collision_start event. Phantom objects do not raise collision events, but llVolumeDetect ones do. Link to comment Share on other sites More sharing options...
Error403Forbidden Posted July 24, 2020 Author Share Posted July 24, 2020 Just now, Fenix Eldritch said: Essentially, you want to play the sound on a collision_start event. Phantom objects do not raise collision events, but llVolumeDetect ones do. OH, would make the object like a door mat count as collision? Link to comment Share on other sites More sharing options...
Rolig Loon Posted July 24, 2020 Share Posted July 24, 2020 (edited) Just be sure that your script includes something that behaves like this .... collision_start(integer num) { llTriggerSound("My bell sound",1.0); } You'll want to embellish that with tests to be sure that you don't ring the bell more than once per person, or ring it only as someone enters. And of course you'll want to be sure that your state_entry event includes llVolumeDetect(TRUE) so that the phantom trigger can be a detector. EDIT;; /me waves to Fenix. You're faster this morning. Edited July 24, 2020 by Rolig Loon 1 Link to comment Share on other sites More sharing options...
Error403Forbidden Posted July 24, 2020 Author Share Posted July 24, 2020 1 minute ago, Rolig Loon said: Just be sure that your script includes something that behaves like this .... collision_start(integer num) { llTriggerSound("My bell sound",1.0); } You'll want to embellish that with tests to be sure that you don't ring the bell more than once per person, or ring it only as someone enters. And of course you'll want to be sure that your state_entry event includes llVolumeDetect(TRUE) so that the phantom trigger can be a detector. EDIT;; /me waves to Fenix. You're faster this morning. I'll give it a go I'm very new to scripts ^^ Link to comment Share on other sites More sharing options...
Fenix Eldritch Posted July 24, 2020 Share Posted July 24, 2020 6 minutes ago, KlDDO said: would make the object like a door mat count as collision? The wiki page for llVolumeDetect I linked above has more details (and examples on how to use) but generally speaking, llVolumeDetect works similar to phantom. The object becomes non-solid and avatars and physical objects pass through with ease. Unlike phantom, the server still keeps track of collisions with llVolumeDetect objects. So when something moves through, it will trigger collision_start and collision_end events for any scripts within the object. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now