Hi everyone, I'm quite new to LUA. In fact I'm so new I currently have no idea where to begin yet with poking at it. I've been fluent in FPI though the commands there obviously didn't handle variables, strings and etc the same way or as intuitively. So yes I'm indeed very much excited that we went the LUA route, only now I'm left unable to make drastic changes to scripts yet. Soon I hope!
Any who, so basically I've been taking a look at our
musicinzone.lua script and was hoping to make a few changes. I noticed that if you step into one zone with the script music will start playing but once you step into another zone with the same script another track will start playing on top of the previous. I was curious as to what command would stop the previous track from playing for the new one to override? What would be a fantastic bonus, is the ability to have the previous track fade out once you enter a new zone and have a new track crossfade in.
As lovely as that script would be, there is something to be noted since two tracks seem to play at the same time. We could really make some good use of this defect of the original musicinzone script. (No offensive intended by saying defect.) What would be an awesome script is having one that could basically utilize two level specific variables (non internal or global) that we could assign tracks to. I'd love to have the ability to have something similar to Skyrim. Where as you have a music track and an ambient environmental track. For instance you could be walking in some plains listen to some exploration stylized music yet by a zone for the plains.... within another zone in the same area playing the sound of light wind blowing across the ground. You walk into a town that has a zone in it that fades the exploration music and fades in music of a town. As you walk around the town you walk into another zone that fades out the light wind track and introduces the ambient track with say the sounds of a blacksmith's smither burning.
I made a video way back early on Reloaded's development which shows a bit of some feature requests I had made at that time. In this video you can see the different uses of sound for example rain, crickets, wind, snow -- all the while playing music behind it.
Basically having two audio layers that can be assigned some way. I know it sounds like a lot to ask for so early on but is something like this possible?
This post may actually just be a command request and I don't know it. Let me know scripting experts what we can do with this concept and if its feasible
Also forgot to add, in the video example the ambient audio sound loops loaded in are loaded in based on what time of the day it is. This would be an ideal concept for when we reintroduce day and night cycles back into Reloaded.
i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce 420 GT