Difference between revisions of "FF8/Field/Script/Opcodes/0BC EFFECTPLAY"

From Final Fantasy Inside
< FF8‎ | Field‎ | Script‎ | Opcodes
Jump to navigation Jump to search
my_wiki>Shard
(Created page with "* Opcode: '''0x0BC''' * Short name: '''EFFECTPLAY''' * Long name: Play sound effect ==== Argument ==== none ==== Stack ==== :''FF8Audio Field ID -7850'' :''Sound channel (m...")
 
m (5 revisions imported)
 
(4 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
* Long name: Play sound effect
 
* Long name: Play sound effect
  
==== Argument ====
+
==== Argument ====
  
 
none
 
none
  
==== Stack ====
+
==== Stack ====
:''FF8Audio Field ID -7850''
 
:''Sound channel (must be power of 2)''
 
:''(volume related?)''
 
:''(volume related?)''
 
:'''EFFECTPLAY'''
 
  
==== Description ====
+
: ''FF8Audio Field ID -7850''
 +
: ''Sound channel (must be power of 2)''
 +
: ''Pan (0=left, 255=right)''
 +
: ''Volume (0-127)''
 +
: '''EFFECTPLAY'''
 +
 
 +
====  Description ====
  
 
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 also to avoid multiple sounds from silencing each other).
 
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 also to avoid multiple sounds from silencing each other).
  
 
Unlike [[FF8/Field/Script/Opcodes/021_EFFECTPLAY2|EFFECTPLAY2]] which requires the field to have a list of sound IDs, this loads and plays a sound directly from the DAT based on its index in the FMT file, but with 7850 subtracted from it (That's where field IDs start counting for some reason). You'll need FF8Audio to find these IDs (FF8SND skips blank entries, which the game actually counts). For example, when you touch a save point, it calls EFFECTPLAY on sound 30, which turns out to be sound 7880 in field IDs.
 
Unlike [[FF8/Field/Script/Opcodes/021_EFFECTPLAY2|EFFECTPLAY2]] which requires the field to have a list of sound IDs, this loads and plays a sound directly from the DAT based on its index in the FMT file, but with 7850 subtracted from it (That's where field IDs start counting for some reason). You'll need FF8Audio to find these IDs (FF8SND skips blank entries, which the game actually counts). For example, when you touch a save point, it calls EFFECTPLAY on sound 30, which turns out to be sound 7880 in field IDs.
 +
 +
Sound channel 0 appears to be able to play sounds while it's already playing sounds. Each other channels can only play one sound at a time.

Latest revision as of 05:24, 23 May 2019

  • Opcode: 0x0BC
  • Short name: EFFECTPLAY
  • Long name: Play sound effect

Argument

none

Stack

FF8Audio Field ID -7850
Sound channel (must be power of 2)
Pan (0=left, 255=right)
Volume (0-127)
EFFECTPLAY

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 also to avoid multiple sounds from silencing each other).

Unlike EFFECTPLAY2 which requires the field to have a list of sound IDs, this loads and plays a sound directly from the DAT based on its index in the FMT file, but with 7850 subtracted from it (That's where field IDs start counting for some reason). You'll need FF8Audio to find these IDs (FF8SND skips blank entries, which the game actually counts). For example, when you touch a save point, it calls EFFECTPLAY on sound 30, which turns out to be sound 7880 in field IDs.

Sound channel 0 appears to be able to play sounds while it's already playing sounds. Each other channels can only play one sound at a time.