The Dink Network

Reply to Re: playsound

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:
 
 
January 25th 2006, 03:44 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
"
playsound
Category: Sound

Version: 1.00+

Prototype: int playsound(int sound_number, int min_speed, int rand_speed_to_add, int active_sprite, bool repeat);

playsound will play the sound loaded with load_sound into the given sound_number.

The sound will play at speed min_speed plus a random value between 0 and rand_speed_to_add. The overall speed is in hertz (typical values are 16000 and 22050 Hz). To play a sound at normal speed, enter a min_speed of the .wav file's recorded hertz, and set the rand_speed_to_add to 0.

If active_sprite is greater than 1, the sound will be attached to that sprite, so it will have a 3-dimensional stereo effect when the sprite moves in relation to the player.

If repeat is set to 1, the sound will repeat until it dies. Typically this will be once the sprite it is attached to dies, or when Dink changes screens.

playsound returns a soundbank number which can be used in other sound-related functions.

" -DinkC Reference

yes indeed, you should read the tutorials