Syntax: Select all
es.emitsound("player", userid, "player/falldamage.wav", 1, 25)
I'm trying to mimic the player falldamage sound, but I'm not sure how to emitsound in sourcepython, so it's only a specific radius people hear the sound?
Syntax: Select all
es.emitsound("player", userid, "player/falldamage.wav", 1, 25)
Syntax: Select all
from engines.sound import Attenuation, Sound
from events import Event
from players.helpers import index_from_userid
my_sound = Sound('player/falldamage.wav', attenuation=Attenuation.GUNFIRE)
@Event('player_say')
def player_say(game_event):
my_sound.index = index_from_userid(game_event['userid'])
my_sound.play()
satoon101 wrote:*Edit: though, in the future, we might consider adding Entity.emit to emit sounds from an entity/player, as well as Player.play to play a sound directly to a user.
Return to “Plugin Development Support”
Users browsing this forum: No registered users and 85 guests