Usage of sounds
Posted: Sat May 10, 2014 3:53 pm
I have this old code, if anybody could answer a few questions or maybe show a quick example i would appriciate it
Thanks in advance
Syntax: Select all
from core import GameEngine
from Source import Shared
def server_spawn(GameEvent):
#in this event i usally precached 'sprites/laserbeam.vmt'
#How would i go for a custom sound file do i precache it? and how would i add it to downloadables
Recipients = Shared.MRecipientFilter()
index = Player.IndexOfUserid(userid)
Recipients.AddRecipient(index)
UserMessage = GameEngine.UserMessageBegin(Recipients, 17, None)
UserMessage.WriteString(audio)
GameEngine.MessageEnd()
Thanks in advance