Adding sound effects

Hello,

I've been trying to figure this out but can't find any specific tutorial that addresses it. How would I go about adding a sound effect for an animation that doesn't have one already? For example for block or fall. I've tried copying the code from other games that have it and have the right paths and sound files but nothing plays in game.
 
Hello,

I've been trying to figure this out but can't find any specific tutorial that addresses it. How would I go about adding a sound effect for an animation that doesn't have one already? For example for block or fall. I've tried copying the code from other games that have it and have the right paths and sound files but nothing plays in game.

Post your text (use code tags please) and let us have a look.

DC
 
So this for example. There's sounds for attack but none for fall. Game is Dungeons & Dragon - Animated Series

Code:
anim    attack1
    loop    0
    delay    27
    range    10 50
    bbox    54 32 42 55
    offset    77 86
    fastattack    1
    hitfx    data/sounds/beat2.wav
    frame    data/chars/orcs/q07.gif
    sound    data/sounds/punch.wav
    delay    7
    frame    data/chars/orcs/q08.gif
    attack    93 50 54 22 40 9 0 0 5 0
    dropv    1 2
    jugglecost    1
    frame    data/chars/orcs/q09.gif
    attack    0 0 0 0 0 0 0 0 0 0
    offset    65 86
    bbox    50 31 40 55
    frame    data/chars/orcs/q01.gif
    
    
    anim    fall
    loop    0
    delay    14
    landframe    3
    offset    78 79
    bbox    59 25 40 55
    drawmethod    remap 6
    frame    data/chars/orcs/q13.gif
    offset    77 74
    drawmethod    remap -1
    frame    data/chars/orcs/q14.gif
    offset    79 71
    delay    500
    frame    data/chars/orcs/q14.gif
    offset    78 61
    bbox    59 25 0 0
    delay    10
    frame    data/chars/orcs/q16.gif
 
Are you saying that you want to replace a default punch sound with a new sound every time you press attack while hearing it without hitting anything or anyone? What I mean is that when a player starts with anim attack1 without hitting enemies, you hear that sound.
 
Are you saying that you want to replace a default punch sound with a new sound every time you press attack while hearing it without hitting anything or anyone? What I mean is that when a player starts with anim attack1 without hitting enemies, you hear that sound.
I want to add a sound to the fall animation. I've tried copying the sound code from attack1 animation to the fall one anim but in game nothing plays.
 
Last edited:
During FALL animation, what sound you want to play? sound when character is falling? when character hits other character? when character lands on the ground?
 
The easiest way is this:
Code:
    anim    fall
    delay    14
    landframe    3
    offset    78 79
    bbox    59 25 40 55
    drawmethod    remap 6
    frame    data/chars/orcs/q13.gif
    offset    77 74
    drawmethod    remap -1
    frame    data/chars/orcs/q14.gif
    offset    79 71
    delay    500
    frame    data/chars/orcs/q14.gif
    offset    78 61
    bbox    59 25 0 0
    delay    10
    sound  data/sounds/land.wav # played when lands on ground.
    frame    data/chars/orcs/q16.gif

When orc lands on the ground, land.wav will be played.
 
Back
Top Bottom