~Hakurei Shrine~ > Rika and Nitori's Garage Experiments

Sound effects...

(1/2) > >>

Infy♫:
Sound effects like kira00 should be played until the end, but danmakufu doesnt obey and stops them when they have to be played again. Is there a way i can make it play until it ends?

Stuffman:
Normally, no. There's a good reason for it, if a sound were set to play when you fired a bullet and you fired a ton at once, you'd get a huge amount of overlapping sound effects which would overwhelm any other sound going on.

Something you could try would be loading the sound effect multiple times into multiple variables, then if you played them they wouldn't recognize it as the same sound and wouldn't overlap. I don't know if this would actually work or if it'd be worth the trouble, though, it's just the first thing that comes to mind.

Drake:
I just you know, don't load it every single time a bullet's fired. It probably sounds like shit that way anyways.

Although, Stuffman's solution might work. Testan.lol no


--- Code: ---#TouhouDanmakufu
#Title[Sound Overlap]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
let frame = 0;
let sound = 0;
let c = GetCurrentScriptDirectory();
let snd1 = c~"seBomb_ReimuB.wav";
let snd2 = c~"seBomb_ReimuB.wav";
let snd3 = c~"seBomb_ReimuB.wav";
let snd4 = c~"seBomb_ReimuB.wav";

    @Initialize {
        SetLife(10000);
    }

    @MainLoop {
        frame++;
        if (frame == 20) {
            frame = 0;
            sound++;
            if (sound > 3) {sound = 0;}
            if (sound == 0){PlaySE(snd1);}
            if (sound == 1){PlaySE(snd2);}
            if (sound == 2){PlaySE(snd3);}
            if (sound == 3){PlaySE(snd4);}
        }
    }


}
--- End code ---

Although, if you create copies of the sound and call a different one every time (shouldn't be too many, judging on how short the sounds are), then you can do it. Too much work and too much clutter, though.

Infy♫:
So...
Imma ask one more question here not to spam this forum.
And coz i can.
I made half a stage. the midboss' normal attack can be played from the list directly, too. but the background turns all black. how can i fix this? i want to keep it playable in the list.

Garlyle:
Yes.  Spellcards usually have their own background images or patterns going on, so they do this.  Once they're done, the normal backgrounds will resume.

You can try removing all traces of @Background{} from your Spellcard, but I can't guarantee it'll work.  I haven't tried it myself.  Alternatively, go google yourself a fitting image for the spellcard's background.

Navigation

[0] Message Index

[#] Next page

Go to full version