Topic: Sound effects...  (Read 3221 times)

0 Members and 1 Guest are viewing this topic.

Infy♫

  • Demonic★Moe
  • *
Sound effects...
« on: April 25, 2009, 03:47:46 pm »
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

  • Spechul Membah
  • *
  • We're having a ball!
  • LOOK AT ME
  • Gender: man with a plan
Re: Sound effects...
« Reply #1 on: April 25, 2009, 04:01:16 pm »
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

  • *
  • LOOK AT ME
Re: Sound effects...
« Reply #2 on: April 25, 2009, 04:41:33 pm »
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: [Select]
#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);}
        }
    }


}

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.
« Last Edit: April 25, 2009, 05:27:17 pm by Drake »

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Infy♫

  • Demonic★Moe
  • *
Re: Sound effects...
« Reply #3 on: April 27, 2009, 04:38:38 pm »
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

  • I can't brain today
  • I have the dumb
Re: Sound effects...
« Reply #4 on: April 27, 2009, 05:47:16 pm »
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.
  • Tormod Plays Games

Stuffman

  • Spechul Membah
  • *
  • We're having a ball!
  • LOOK AT ME
  • Gender: man with a plan
Re: Sound effects...
« Reply #5 on: April 27, 2009, 07:49:13 pm »
This sounds pretty strange to me. In PoSR the backgrounds in my stages would keep showing while bosses and spellcards were onscreen (until I recently disabled them during spellcards to save processing power, anyway).

Do your attacks/spellcards have a @Background in them? Mine don't, and they're not necessary. If they do, try taking them out. They might be overriding the @Background of your stage.
 

SMF 2.0.15 | SMF © 2017, Simple Machines
Theme based on ModernDark64 design by BlocWeb
Page created in 0.043 seconds with 40 queries.