Reply to Re: Story scripts suck
If you don't have an account, just leave the password field blank.
The DinkC Reference says (about playsound):
# Category: Sound
# Prototype:
# int playsound( int sound#, int min_speed, int rand_speed_to_add, int sprite_or_0, bool repeat? );
Plays a sound. If rand_speed_to_add isn't 0, a random # will be made from this # and added to the sound. If sprite isn't 0, the sound will be 3D based on this sprite's location. If the sprite is killed for some reason ([e.g.], a fire goes out), the sound will die too. If repeat is not 0, the sound will repeat.
Returns the soundbank used. Use this for special control of the sound. See: sound_set_vol() [to reduce the volume of the played sound] sound_set_survive() [to make the sound survive a screen change] sound_set_kill() [to kill a sound set to "survive"]
See also:
load_sound() [<sound#> argument is as set by load_sound()]
Hmm... doesn't give us any information on that sound# thing. It's up to you to download it and look up what it does and how it works. It's the best way to learn things: try something, make it crash, try to figure out yourself what might be the cause, look up the correct use and syntax of the used functions, fix it, rerun it, etc.
# Category: Sound
# Prototype:
# int playsound( int sound#, int min_speed, int rand_speed_to_add, int sprite_or_0, bool repeat? );
Plays a sound. If rand_speed_to_add isn't 0, a random # will be made from this # and added to the sound. If sprite isn't 0, the sound will be 3D based on this sprite's location. If the sprite is killed for some reason ([e.g.], a fire goes out), the sound will die too. If repeat is not 0, the sound will repeat.
Returns the soundbank used. Use this for special control of the sound. See: sound_set_vol() [to reduce the volume of the played sound] sound_set_survive() [to make the sound survive a screen change] sound_set_kill() [to kill a sound set to "survive"]
See also:
load_sound() [<sound#> argument is as set by load_sound()]
Hmm... doesn't give us any information on that sound# thing. It's up to you to download it and look up what it does and how it works. It's the best way to learn things: try something, make it crash, try to figure out yourself what might be the cause, look up the correct use and syntax of the used functions, fix it, rerun it, etc.