Editing PlaySoundEx
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 1: | Line 1: | ||
'''PlaySoundEx''' (string ''soundname'', string ''channel'' [, bool ''loop'' [, int ''attenuation'' [, int ''volume'']]])<br> | |||
==Usage== | |||
'''PlaySoundEx'''(''soundname'', ''channel'' [, ''loop'' [, ''attenuation'' [, ''volume'']]]) | |||
Plays the a sound on the specified channel. Each actor has its own set of channels to play sounds on, so sounds played by different actors will not affect each other. This function allows sounds to be played on a specific channel, which can allow for multiple sounds generated from one actor simultaneously that would normally cut each other off, or other special effects. | |||
===Parameters=== | |||
*soundname: The "nice name" of the sound to play. See the [[Sound]] EDF block documentation for how to define this. | *soundname: The "nice name" of the sound to play. See the [[Sound]] EDF block documentation for how to define this. | ||
*channel: The channel to play the sound on. Sound played on separate channels will not interfere with each other. Valid values are: | *channel: The channel to play the sound on. Sound played on separate channels will not interfere with each other. Valid values are: | ||
Line 21: | Line 24: | ||
**attn_none: Plays at this ambience definition's volume level regardless of distance. | **attn_none: Plays at this ambience definition's volume level regardless of distance. | ||
*volume: The volume to play the sound at, this can be a value from 0-127. 0, being the default, is equivalent to 127. | *volume: The volume to play the sound at, this can be a value from 0-127. 0, being the default, is equivalent to 127. | ||
==Examples== | |||
frame DEMOFRAME | |||
frame DEMOFRAME { cmp = "TROO | A | * | -1 | PlaySoundEx(Cow_Moo, chan_body, 0, attn_idle) | @next" } | |||
[[Category:Codepointers]] | |||