StopSound: Difference between revisions
From Eternity Wiki
Jump to navigationJump to search
(Created page with "''void'' '''StopSound'''(''int tid''[, ''int channel'']) Stop sounds from playing from things tagged as ''tid''. You can specify from which ''channel'' to cancel the soun...") |
No edit summary |
||
Line 1: | Line 1: | ||
''void'' '''StopSound'''(''int tid''[, ''int channel'']) | {{ACSFunction|description=Stop sounds from playing from things. | ||
|usage=''void'' '''StopSound'''(''int tid''[, ''int channel'']) | |||
|parameters= | |||
* '''CHAN_AUTO''' | *''tid'': [[TID]] of things to stop sound sequence | ||
* '''CHAN_WEAPON''' | *''channel'': from which channel to cancel the sounds, and it can be one of the following: | ||
* '''CHAN_VOICE''' | :* '''CHAN_AUTO''' | ||
* '''CHAN_ITEM''' | :* '''CHAN_WEAPON''' | ||
* '''CHAN_BODY''' | :* '''CHAN_VOICE''' | ||
* '''CHAN_5''' | :* '''CHAN_ITEM''' | ||
* '''CHAN_6''' | :* '''CHAN_BODY''' | ||
* '''CHAN_7''' | :* '''CHAN_5''' | ||
Beware that the '''StopSound''' function defaults ''channel'' (if omitted) to '''CHAN_BODY''', but the most common channel for sounds played from [[EDF]] is '''CHAN_AUTO''', so most of the time you'll want to specify ''channel'' as such. | :* '''CHAN_6''' | ||
:* '''CHAN_7''' | |||
|notes=Beware that the '''StopSound''' function defaults ''channel'' (if omitted) to '''CHAN_BODY''', but the most common channel for sounds played from [[EDF]] is '''CHAN_AUTO''', so most of the time you'll want to specify ''channel'' as such. | |||
*[[ | |id=<code>-62:StopSound(1,2)</code> | ||
|seealso= | |||
*[[SoundSequence]] | |||
[[ | *[[SoundSequenceOnActor]]}} |
Latest revision as of 08:11, 22 November 2020
Description[edit]
This is an ACS built-in function.
Stop sounds from playing from things.
Usage[edit]
void StopSound(int tid[, int channel])
Parameters[edit]
- tid: TID of things to stop sound sequence
- channel: from which channel to cancel the sounds, and it can be one of the following:
- CHAN_AUTO
- CHAN_WEAPON
- CHAN_VOICE
- CHAN_ITEM
- CHAN_BODY
- CHAN_5
- CHAN_6
- CHAN_7
Return value[edit]
Examples[edit]
No examples given.
Notes[edit]
Beware that the StopSound function defaults channel (if omitted) to CHAN_BODY, but the most common channel for sounds played from EDF is CHAN_AUTO, so most of the time you'll want to specify channel as such.
This function's identification in zspecial.acs
is: -62:StopSound(1,2)
.