Fandom

武装突袭 Wiki

SetSoundEffect

简体 | 繁體

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

您使用了广告屏蔽软件!


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

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

  

点击图片可看到更多讯息

开始使用于

游戏:
Armed Assault
版本:
1.00

描述

描述:
Defines the different sound effects.

Sound / voice plays a 2D / 3D sound from CfgSounds.

SoundEnv plays an enviromental sound from CfgEnvSounds.

SoundDet (only for triggers) creates a dynamic sound object attached to a trigger defined in CfgSFX.



Use "$NONE$" to stop the sound (1st item). Also use $NONE$ to skip the sound (1st item), when there is none to be used (Example 3).

基本句法

句法:
trigger setSoundEffect [sound, voice, soundEnv, soundDet]
参数:
trigger: Object

[sound, voice, soundEnv, soundDet]: Array of strings
返回值:
Nothing

替代句法

句法:
waypoint setSoundEffect [sound, voice, soundEnv, soundDet]
参数:
waypoint: Array - format Waypoint

[sound, voice, soundEnv, soundDet]: Array of strings
返回值:
Nothing

范例

范例1:
_trigger setSoundEffect ["Alarm", "", "", ""];
范例2:
 [_group1,2] setSoundEffect ["Alarm", "", "", ""];
范例3:
_trigger setSoundEffect ["$NONE$", "", "", "MySound"];

额外资讯

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

createTriggersetMusicEffect

注意事项

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

Notes

Posted on October 2, 2013
Neokika
To avoid having to create a dummy sound definition, you can use $NONE$ instead.

private "_trigger"; _trigger = createTrigger ["EmptyDetector", position player]; _trigger setTriggerStatements ["true", "", ""]; _trigger setSoundEffect ["$NONE$", "", "BattlefieldFirefight1", ""];

Posted on March 7, 2012
old_man_auz
When using this function, I found that if the parameter sound was empty, then you would always get a 'Sound not found' error. The following code fixes this problem. You need to create a dummy sound. This is what example 3 is hinting towards.

description.ext: class CfgSounds { sounds[] = {}; class NoSound {name = "NoSound";sound[] = {"", 0, 1};titles[] = {};}; //Dummy sound needed for setSoundEffect command, due to stupid bug in engine. }; (code sample above written by 'CarlGustaffa' on the Bohemia Interactive forums.)

script.sqf: _trigger = createTrigger[ "EmptyDetector" , _position ]; _trigger setTriggerStatements [ "true" , "" , "" ]; _trigger setSoundEffect[ "NoSound" , "" , "" , "Wind2_EP1" ];

Bottom Section

更多维基

随机维基