Difference between revisions of "FF8/Field/Script/Opcodes/021 EFFECTPLAY2"

From Final Fantasy Inside
< FF8‎ | Field‎ | Script‎ | Opcodes
Jump to navigation Jump to search
my_wiki>Shard
(Description)
my_wiki>Albeoris
(Created page with "* Opcode: '''0x021''' * Short name: '''EFFECTPLAY2''' * Long name: Play sound effect ==== Argument ==== Field SFXID (in the SFX list for that field) ==== Stack ==== :...")
Line 3: Line 3:
 
* Long name: Play sound effect
 
* Long name: Play sound effect
  
==== Argument ====
+
==== Argument ====
  
 
Field SFXID (in the SFX list for that field)
 
Field SFXID (in the SFX list for that field)
  
==== Stack ====
+
==== Stack ====
:''Pan (0=left, 255=right)''
 
:''Volume (0-127)''
 
:''Channel (must be a power of 2)''
 
:'''EFFECTPLAY2'''
 
  
==== Description ====
+
: ''Pan (0=left, 255=right)''
 +
: ''Volume (0-127)''
 +
: ''Channel (must be a power of 2)''
 +
: '''EFFECTPLAY2'''
  
Plays a sound effect through the given sound channel. The channel is important because it's the parameter used in [[FF8/Field/Script/Opcodes/0CD_SESTOP|SESTOP]] to halt a specific sound effect (and to prevent multiple counds from silencing each other). AFAIK Channels go up to 2^20 (which is 1048576), so you can theoretically have 20 sounds playing at once. 0 is a usable channel, but it has special and confusing properties, so it's best not to use it.
+
====  Description  ====
  
Note: It seems each area can have a maximum of 32 sounds predefined (meaning sound ID 31 is the highest you can play with this). You have to use [[FF8/Field/Script/Opcodes/0BC EFFECTPLAY|EFFECTPLAY]] to use more than 32 sounds.
+
Plays a sound effect through the given sound channel. The channel is important because it's the parameter used in [[FF8/Field/Script/Opcodes/0CD_SESTOP|SESTOP]] to halt a specific sound effect (and to prevent multiple counds from silencing each other). AFAIK Channels go up to 2^20 (which is 1048576), so you can theoretically have 20 sounds playing at once. 0 doesn't seem like it's a usable channel, but this is untested.
 +
 
 +
Note: It seems each area can have a maximum of 32 sounds predefined (meaning sound ID 31 is the highest you can play with this). You have to use [[FF8/Field/Script/Opcodes/0BC_EFFECTPLAY|EFFECTPLAY]] to use more than 32 sounds.

Revision as of 04:31, 24 March 2018

  • Opcode: 0x021
  • Short name: EFFECTPLAY2
  • Long name: Play sound effect

Argument

Field SFXID (in the SFX list for that field)

Stack

Pan (0=left, 255=right)
Volume (0-127)
Channel (must be a power of 2)
EFFECTPLAY2

Description

Plays a sound effect through the given sound channel. The channel is important because it's the parameter used in SESTOP to halt a specific sound effect (and to prevent multiple counds from silencing each other). AFAIK Channels go up to 2^20 (which is 1048576), so you can theoretically have 20 sounds playing at once. 0 doesn't seem like it's a usable channel, but this is untested.

Note: It seems each area can have a maximum of 32 sounds predefined (meaning sound ID 31 is the highest you can play with this). You have to use EFFECTPLAY to use more than 32 sounds.