Thread Tools Display Modes
05/14/14, 03:19 AM   #1
atomico
Join Date: Apr 2014
Posts: 5
how play a sound?

Hi i want add a sound when an event happen.

i read that exist playsound() but which argument i need to pass?
  Reply With Quote
05/14/14, 04:46 AM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by atomico View Post
Hi i want add a sound when an event happen.

i read that exist playsound() but which argument i need to pass?
Full list of sounds is in global table SOUNDS. If you have installed addon Zgoo, use command /zgoo SOUNDS to inspect this table.

Example:
Code:
PlaySound(SOUNDS.DEFAULT_CLICK)
or directly (value of SOUNDS.DEFAULT_CLICK is string "Click")
Code:
PlaySound("Click")
  Reply With Quote
05/14/14, 04:51 AM   #3
atomico
Join Date: Apr 2014
Posts: 5
ok tnx.. is it possible use custom sound?
  Reply With Quote
05/14/14, 04:55 AM   #4
Harven
 
Harven's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 135
Originally Posted by Garkin View Post
...If you have installed addon Zgoo, use command /zgoo SOUNDS to inspect this table...
You can also simply execute this command in the chat window (if SOUNDS is a flat table):
Code:
/script for k,v in pairs(SOUNDS) do f(k.." "..tostring(v)) end
EDIT: I'm not 100% sure but I think you can't play custom audio files.

Last edited by Harven : 05/14/14 at 05:06 AM.
  Reply With Quote
05/14/14, 09:57 AM   #5
zolan
 
zolan's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 11
Originally Posted by atomico View Post
ok tnx.. is it possible use custom sound?
All of the documentation I've read has said that you can not supply your own sounds, you have to use in-game sounds only. Hopefully this will change at some point.

~Zolan
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » how play a sound?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off