PlaySound: Difference between revisions

From Eternity Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 1: Line 1:
PlaySound exists both as an [[ACS]] function and as an [[EDF]] codepointer. Syntax differs.
==ACS function==
void PlaySound (int tid, str sound [, int channel [, fixed volume [, bool looping [, fixed attenuation]]]])
==EDF codepointer==
Parameters:  
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)  
Line 13: Line 20:
For [[DECORATE state syntax|Decorate]] availability, use [[PlaySoundEx]] instead.
For [[DECORATE state syntax|Decorate]] availability, use [[PlaySoundEx]] instead.


==See also==
===See also===
*[[List of codepointers]]
*[[List of codepointers]]
*[[PlaySoundEx]]
*[[PlaySoundEx]]
[[Category:Codepointers]]
[[Category:Codepointers]]
[[Category:MBF codepointers]]
[[Category:MBF codepointers]]

Revision as of 02:04, 20 June 2019

PlaySound exists both as an ACS function and as an EDF codepointer. Syntax differs.

ACS function

void PlaySound (int tid, str sound [, int channel [, fixed volume [, bool looping [, fixed attenuation]]]])

EDF codepointer

Parameters:

  • misc1 = Sound mnemonic or DeHackEd number to play (must be valid, no default)
  • misc2 = Select sound volume
    • 0 = normal (default)
    • 1 = full volume

Causes the object to emit the sound indicated by the provided sound mnemonic or DeHackEd number, at the indicated volume level.

If the sound name or number is invalid, nothing will happen.

Can be used with PlayerThunk.

For Decorate availability, use PlaySoundEx instead.

See also