The Dink Network

Reply to Re: Punch sequence and sound

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 26th 2011, 04:31 AM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
The problem here is that you are using the "playsound" command wrong, and you have the wrong sequence for dink's "play_seq", you are using the sequence of dink throwing seed, rather than his hit procedure. The sequence you should be using is "108"... now if you look in Windinkedit (or whatever editor your using), you will notice the sequence loaded there is dink hitting with his sword.. but this changes in-game, depending on the weapon the player has selected (the weapons script loads the different hit sequences on the fly using the init command).
The "playsound" command works by playing the sound number loaded into "start.c" with the "load_sound" command.
In "Start.c" the "punch.wav" is loaded into the number 9.. if you open it and look you will see lots of "load_sound" commands, and among them is - load_sound("PUNCH.WAV", 9);
So:

void main(void)
{
fade_down();
freeze(1);
sp_dir(1, 8);
wait(1000);
say_stop_xy("`%bla", 0, 200);
say_stop_xy("`%bla bla bla, bla bla", 0, 200);
fade_up();
say_stop("bla bla, bla bla bla, bla bla", 1);
wait(100);
say_stop("`5bla!", &current_sprite);
wait(50);
say_stop("bla bla!", 1);

sp_seq (1, 108); //Play dinks hit sequence
sp_frame(1, 1); //Reset sequence to frame 1
sp_kill_wait(1); //This will make Dink hit right away
wait(25);
playsound(9, 22050, 0, 0, 0); 

say_stop("`5bla", &current_sprite);

sp_seq (1, 108); //Play dinks hit sequence
sp_frame(1, 1); //Reset sequence to frame 1
sp_kill_wait(1); //This will make Dink hit right away
wait(25);
playsound(9, 22050, 0, 0, 0); 

&update_status = 1;
draw_status();
unfreeze(1);
}