Editing PlaySound
From Eternity Wiki
Jump to navigationJump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
==ACS function== | ==ACS function== | ||
''void'' '''PlaySound'''(''int tid'', ''str sound'' [, ''int channel'' [, ''fixed volume'' [, ''bool looping'' [, ''fixed attenuation'']]]]) | |||
Plays sound on a tagged thing. | |||
Parameters: | |||
*''tid'': tag of thing to play the sound | *''tid'': tag of thing to play the sound | ||
*''sound'': name of sound to play | *''sound'': name of sound to play | ||
Line 12: | Line 13: | ||
*''looping'': whether to loop the sound (default: FALSE). | *''looping'': whether to loop the sound (default: FALSE). | ||
*''attenuation'': attenuation, how much to fade sound with distance, default '''ATTN_NORM'''. Note that despite this being a fixed-point number, it really only results in some specific attenuation patterns. Expected values are: '''ATTN_NONE''', '''ATTN_NORM''', '''ATTN_IDLE''' and '''ATTN_STATIC'''. | *''attenuation'': attenuation, how much to fade sound with distance, default '''ATTN_NORM'''. Note that despite this being a fixed-point number, it really only results in some specific attenuation patterns. Expected values are: '''ATTN_NONE''', '''ATTN_NORM''', '''ATTN_IDLE''' and '''ATTN_STATIC'''. | ||
===See also=== | |||
*[[ActivatorSound]] | *[[ActivatorSound]] | ||
*[[AmbientSound]] | *[[AmbientSound]] | ||
*[[LocalAmbientSound]] | *[[LocalAmbientSound]] | ||
==EDF codepointer== | ==EDF codepointer== | ||
Parameters: | |||
: | |||
*'''misc1''' = Sound mnemonic or DeHackEd number to play (must be valid, no default) | *'''misc1''' = Sound mnemonic or DeHackEd number to play (must be valid, no default) | ||
*'''misc2''' = Select sound volume | *'''misc2''' = Select sound volume | ||
**0 = normal (default) | **0 = normal (default) | ||
**1 = full volume | **1 = full volume | ||
Causes the object to emit the sound indicated by the provided sound mnemonic or DeHackEd number, at the indicated volume level. | Causes the object to emit the sound indicated by the provided sound mnemonic or DeHackEd number, at the indicated volume level. | ||
Line 39: | Line 33: | ||
Can be used with [[PlayerThunk]]. | Can be used with [[PlayerThunk]]. | ||
For [[DECORATE state syntax|Decorate]] availability, use [[PlaySoundEx]] instead. | For [[DECORATE state syntax|Decorate]] availability, use [[PlaySoundEx]] instead. | ||
===See also=== | |||
*[[List of codepointers]] | |||
*[[PlaySoundEx]] | *[[PlaySoundEx]] | ||
[[Category:ACS]] | [[Category:ACS]] | ||
[[Category:Codepointers]] | [[Category:Codepointers]] | ||
[[Category:MBF codepointers]] | [[Category:MBF codepointers]] |