Fandom

武装突袭 Wiki

PlaySound3D

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 分享

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

Introduced with Arma 3 version 0.50
  Arguments of this scripting command don't have to be local to the client the command is executed onEffects of this scripting command are broadcasted over the network and happen on every computer in the network

点击图片可看到更多讯息

开始使用于

游戏:
Arma 3
版本:
0.50

描述

描述:
Plays positional sound with given filename on every computer on network. At least 2 parameters must be specified.

基本句法

句法:
playSound3D [filename, soundSource, isInside, soundPosition, volume, soundPitch, distance]
参数:
[filename, soundSource, isInside, soundPosition, volume, soundPitch, distance]: Array

filename: String

soundSource: Object - the object emitting the sound. If "sound position" is specified this param is ignored

isInside: Boolean (optional) Default: false

soundPosition: PositionASL (optional) - position for sound emitter, will override "sound source" position. Default: [0,0,0]

volume: Number (optional) Default: 1

soundPitch: Number (optional) - 1: Normal, 0.5: Darth Vader, 2: Chipmunks, etc. Default: 1

distance: Number (optional) - How far is sound audible (0 = no max distance) Default: 0.
返回值:
Nothing

范例

范例1:
playSound3D ["A3\Sounds_F\sfx\blip1.wav", player]

范例2:
playSound3D ["A3\Sounds_F\sfx\blip1.wav", player, false, getPosASL player, 1, 1, 0]

范例3:
Sound file extension must be specified even if a config entry has none: playSound3D ["A3\Sounds_F\sfx\alarm_independent", player]; //no sound playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", player]; //alarm

额外资讯

多人游戏:
-
也可以看看:

say3DplaySoundsay2DsaysetRandomLip

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

Notes

Posted on September 23, 2013
Killzone_Kid
This command works well with addon sounds, however getting it to play mission sound files is a bit tricky. Follow this guide


Bottom Section

Posted on September 26, 2014 - 09:18 (UTC)
Killzone Kid
Currently, playSound3D is not JIP compatible, so joining players will not hear the sound if is started before and is still playing when player joins.

Posted on October 16, 2013 - 08:21 (UTC)
Jacmac
You need to get the correct path for custom mission sounds. Use missionConfigFile with BIS_fnc_trimString (to trim off "description.ext"), then add your mission's sound directory and sound file: _soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; _soundToPlay = _soundPath + "sounds\some_sound_file.ogg"; playSound3D [_soundToPlay, _sourceObject, false, getPos _sourceObject, 10, 1, 50]; //Volume db+10, volume drops off to 0 at 50 meters from _sourceObject
Posted on November 8, 2014 - 21:48 (UTC)
Killzone Kid
When object is supplied but not a position, the position is taken from object, otherwise the position is taken from supplied position. That doesn't mean that when position is taken from object it is going to follow object when it changes position. The sound is generated at object position and it stays there.

更多维基

随机维基