本教程是对a的回应 this tutorial is in a response to a
来自流浪大火的评论，他们问如何做 comment from stray fire who asks how to
通过自定义制作AI汽车驱动器 make an AI car drive by with custom
音乐就像在战场越南的时候 music like in battlefield vietnam when
你可以大声播放surfin鸟 you could play surfin bird' loud through
在敌人后面驾驶你的收音机 your radio while driving behind enemy
用于处理声音和音乐的线条 lines to work with sounds and music in
装甲任务我们做了很多工作 armored missions a lot of the work we
需要做的是实际在外面进行 need to do is actually performed outside
伊甸园编辑所以节省一些时间我 the eden editor so to save some time I
刚刚在这里设置了一只小鸟 have just set up here a little bird with
AI飞行员和我们的飞行路径 an AI pilot and a flight path which we
将用作我们音乐的来源 will use for the source of our music
当你准备开始添加 when you are ready to start adding the
为您的声音和/或音乐奠定基础 groundwork for your sounds and/or music
继续前进，然后保存你的任务 go ahead and save your mission then you
需要找到你的任务文件夹 need to find the mission folder in your
装甲任务或MP任务目录 armor missions or MP missions directory
这个位置取决于你是否保存了它 this location depends on if you saved it
作为多人游戏或单人游戏 as a multiplayer or single-player
在这种情况下的任务是一个 mission in this case it's a
任务中的单人任务 single-player mission within the mission
文件夹创建另一个名为的子文件夹 folder create another subfolder called
声音，音乐或其他任何你在这里 sounds or music or whatever in here you
将我们的声音文件放置ARMA 3 will place our sound files ARMA 3
支持我们拥有的wav和OGG声音文件 supports wav and OGG sound files we have
一个名为“骑行”的WAV文件 a single WAV file called ride then going
回到我们需要的任务根文件夹 back to the missions root folder we need
创建描述点txt文件 to create a description dot txt file
这些文件用于创建自定义 these files are used to create custom
在任务中编写脚本的对象 objects that script within the mission
然后可以使用你可以创建和编辑 can then use you can create and edit
这个文件在任何基本的文本编辑器中 this file in any basic text editor like
记事本在这里我们正在创建一个对象 notepad here we are creating a object
这个叫做CFG的课堂 class called CFG sounds within this
class我们有一个名为的数组对象 class we have an array object called
在这个声音我们创造一个自定义 sounds within this we create a custom
您可以使用的称为音乐的对象 object called music one you could use
这里有任何标识符，只要你 any identifier here as long as you
如果你想使用它，请记住它 remember it if you wanted to use
你的多个不同的声音 multiple different sounds in your
任务你会创建其中之一 mission you would create one of these
对于声音数组中的每一个我们只是 for each within the sounds array we just
有一个有三个属性名称 have the one with three properties name
可以购买任何你想要的字符串值 which can buy any string value you wish
声音是另一个数组包含一个 sound which is another array contains a
文件引用中的声音文件路径 file reference to the sound file path in
与此描述文件的关系 relation to this description file an
你声音音量的整数 integer for the volume of the sound you
将必须 will have to
玩这个和一个整数的音高 play with this and an integer for pitch
一个是默认声音将播放 one being default the sound will play
不变的标题是另一个数组对象 unchanged titles is another array object
这是必需的，但我们没有使用 that's required but we are not using
这里我们把它留空以保存 here so we have left it blank to save
您要使用的文件另存为 the file you will want to use save as
文件名描述dot txt和be file name description dot txt and be
一定要将文件类型更改为all sure to change the file type to all
我们可以完成所有工作的文件 files with all that work done we can
回到编辑 return to the editor
所以你可以看到给车辆 so as you can see are given the vehicle
在这种情况下，小鸟是一个变量 in this case the little bird a variable
h1的名称，所以我们可以在何时引用它 name of h1 so we can reference it when
分配声源但是这个 assigning the sound source but this
可以是任何其他物体或车辆或 could be any other object or vehicle or
aa单位或玩家然后在 a a unit or player then in the
直升机的启动代码为 initiation code for the helicopter as
我们黑客攻击计算机和 with our hacking the computer and
停电教程我附上了 blackout tutorials I am attaching an
动作到这个上下文菜单 action to the context menu of this
对象上下文菜单选项将是 object the context menu option will be
当播放器激活时音乐开启 music on when activated by a player it
将执行以下代码h1 will execute the following code h1 which
在这种情况下出车是说3D音乐 is out vehicle in this case say 3d music
1是声音的参考 1 which is the reference to the sound
我们在描述中创建的对象 object we created in the description
文件接下来是声音的范围或 file next is the range of the sound or
有多远可以听到1000米 how far away is can be heard 1000 meters
再一次是声音的音调 and again the pitch the sound is to be
在这种情况下玩正常的一个 played at in this case normal one so
这说三维功能填充播放我们的声音 this say 3d function fill play our sound
关于源对象h1这个 in relation to the source object h1 this
行不必在行动中 line doesn't have to be in an action on
可以触发的对象 the object it could be triggered from
任何地方，如激活脚本 anywhere so as the activation script of
一个航点 a waypoint
或者在事件的激活脚本中 or in the activation script for an event
触发 trigger
您 you
无论如何，让我们试一试 anyways let's give this a try
你可以看到音乐选项是 as you can see the music on option is
在直升机的背景下可用 available in the helicopter's context
菜单和繁荣 menu and boom
[掌声] [Applause]
史诗 epic
[掌声] [Applause]
因为我们在直升机上了 since we are in the helicopter that the
声音很明显地依附于它 sound is attached to obviously its
跟着我们，听起来很正常 following us so it sounds normal like
从汽车收音机出来的音乐会 music coming out of a car radio would to
有人在车里 someone in the car
[音乐] [Music]
[掌声] [Applause]
[音乐] [Music]
现在让我们举例说明一下 now let's give an example of how it
从直升机外面传来的声音 sounds from outside the helicopter and
而不是上下文菜单激活我们 instead of a context menu activation we
将会激活音乐 will activate the music when the
直升机到达其第一个Waypoint helicopter reaches its first Waypoint
所以我们只需要一行并添加它 so we just take the one line and add it
进入航点激活脚本 into the waypoints activation script
我会在外面和地面上 I'll be outside and on the ground
还有这个演示先生，你可以看到 and also for this demo sir you can see
听起来是什么感觉 what it sounds like see what it sounds
喜欢 like
什么他妈的我说话有一天 what the me talk pretty one day
听听它听起来像现在这样 hear what it sounds like so now the
在飞行员击中之前音乐不会转动 music won't turn until the pilot hits
第一个航路点即将结束 the first waypoint towards the end of
机场 the airfield
所以它打开了，它有点儿 so it's turned on and it's a little
因为他离得更远而且 quitter because he is further away and
随着他走得更远，它现在得到了解决 as he goes further it gets quitter now
他回来了，音量很大 he's coming back and the volume
增加你也不会 increases do you will also not the
由于多普勒导致的音调变化 change in pitch due to the Doppler
效果在三维空间中被塑造 effect being molded in a 3d space by the
装甲引擎多普勒效应被命名 armored engine Doppler effect is named
在奥地利物理学家克里斯蒂安之后 after the Austrian physicist Christian
多普勒描述了这种现象 Doppler who described the phenomenon in
1842年是多普勒频移的常见例子 1842 a common example of Doppler shift
是a时听到的音高变化 is the change of pitch heard when a
车辆发出警报声或号角 vehicle's sounding a siren or horn
方法通过和退出 approaches passes and recedes from an
观察者与发射的相比 observer compared to the emitted
频率接收频率是 frequency the received frequency is
在接近相同的时候更高 higher during the approach identical at
经过和降低的瞬间 the instant of passing by and lower
在经济衰退期间的来源 during the recession when the source of
海浪正向观察者移动 the waves is moving towards the observer
每个连续的波峰都被发射出去 each successive wave crest is emitted
从靠近观察者的位置 from a position closer to the observer
因此每个都比前一波 than the previous wave therefore each
波浪到达的时间略短 wave takes slightly less time to reach
观察者比前一波 the observer than the previous wave
因此到达之间的时间 hence the time between the arrival of
观察者连续的波峰 successive wave crests at the observer
减少导致增加 is reduced causing an increase in the
他们旅行时的频率 frequency while they are traveled the
连续波阵面之间的距离 distance between successive wave fronts
减少所以波浪聚集在一起 is reduced so the waves bunched together
相反，如果波的来源是 conversely if the source of waves is
每一波远离观察者 moving away from the observer each wave
发出任何问题 is emitted any questions post in the
以下评论以及任何请求 comments below along with any requests
谢谢你的收看 thanks for watching