Data Realms Fan Forums http://45.55.195.193/ |
|
I need a simple lua script for sound control http://45.55.195.193/viewtopic.php?f=73&t=45073 |
Page 1 of 1 |
Author: | Vrinrock [ Wed Jan 16, 2013 7:41 pm ] |
Post subject: | I need a simple lua script for sound control |
I want a lua script that plays a sound when an actor is spawned and shuts it off when that specific actor dies, but can check to see if the sound is already playing as to not play it more than once if more than one actor is spawned, and shuts off when the original one dies. So like check>>>actor spawned>>>play>>>> if other actor spawned>>>>check if song already played>>> do not play if already played>>>> if actor dies turn off song>>> no idea eehhhhheh |
Author: | CaveCricket48 [ Wed Jan 16, 2013 9:40 pm ] |
Post subject: | Re: I need a simple lua script for sound control |
Do you plan to have this as background music or sound-effect like? If you're going for sound effect, using an emitter with your sound as the burst sound effect will play the entire sound even when the emitter dies, and you can just have a variable to change when you add the emitter. If you're going for background music, same concept, just use the function that changes the music. |
Author: | Vrinrock [ Wed Jan 16, 2013 10:20 pm ] |
Post subject: | Re: I need a simple lua script for sound control |
CaveCricket48 wrote: Do you plan to have this as background music or sound-effect like? If you're going for sound effect, using an emitter with your sound as the burst sound effect will play the entire sound even when the emitter dies, and you can just have a variable to change when you add the emitter. If you're going for background music, same concept, just use the function that changes the music. Oh you can control both using lua??? Basically I wanted it to be a surprise but I'm trying to create a walking boombox that shoots single shot weapons and when shot these weapons play a sound that would be a whole song. |
Author: | CaveCricket48 [ Sat Jan 19, 2013 2:59 am ] |
Post subject: | Re: I need a simple lua script for sound control |
Just have the script on the actor that watches whether or not if it fires, and control the emitter spawning appropriately. |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |