~Hakurei Shrine~ > Rika and Nitori's Garage Experiments
Danmakufu Intermediate Tutorial
Stuffman:
I dunno but it's a pretty nice compilation of various information. I've added it to the index.
Naut:
Well, it was everywhere, so instead of having to search every nook and cranny for a post on how to do something, here's an index of most intermediate concepts (and some advanced ones too, I suppose). This took a little longer than expected when I lost it on my old computer, and until recently, haven't been able to work on it because I hadn't the means to transfer things over (plus there were other things I needed from the old computer, so I wanted to do it all at once). Oh well, it's pretty much done for now, better late than never eh. Hope some of these white names I've seen around get some use out of it.
Iryan:
Awesome Sauce!
I guess the only adidtional thing required is to put the explanation for how to use sounds somewhere in there. Yeah, I know it is really only one command, but an important one, I think.
Something like...
_________________
For now, your scripts may be fun to play and/or look pretty. However, an easy way to enrich your scripts is to have shots, movements, pattern changes and other happenings be accompanied by sound effects.
To accomplish this, the first thing you have to do is to get a hold of fitting sound effects to use, of course. To do this, just download some files other people have posted here.
If you have your sound files, you can either put them inside your script folder or create a seperate folder inside it. For the sake of ease, let's call the folder "sounds".
Now, all you have to put the following command inside your MainLoop or inside a task at the point where the sound is supposed to be heard:
--- Code: ---PlaySE(----Path of the sound file---);
--- End code ---
I the sound file is inside the folder "sounds" and if the folder "sounds" is in the same folder as the script, it would look like this:
--- Code: ---PlaySE(GetCurrentScriptDirectory~"sounds\Shot1.wav");
--- End code ---
______________________
Something like that.
Edit: fixed some errors. I need sleep...
Naut:
Added a sound and music tutorial, thanks for the suggestion. Too many times do I see people play the same sound effect 20 times a frame....
Iryan:
Actually you don't need to load the sound file first. If you PlaySE a sound file that is not loaded, danmakufu will load it and play it. The loading is only really neccessary for larger sound files and when playing on really slow computers.
I never loaded a sound effect beforehand in my scripts an they work just fine and without lags.