如何为行为添加自定义声音文件? [英] How do you add a custom sound file to a behavior?
本文介绍了如何为行为添加自定义声音文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将自定义.wav声音文件与行为相关联。
我转到游戏区域,并从我的计算机添加一个文件。当我回到Actors区域,然后单击Actor然后单击Behaviors,然后转到给定行为的Choose a Sound Effect部分时,我单击Source下的File按钮,我添加的文件未列出,也没有有没有办法浏览到一个。
这是一个错误吗?
谢谢
Hi,
I am trying to associate a custom .wav sound file with a behavior.
I go to the Game area, and add a file from my computer. When I go back to the Actors area, and click the Actor and then Behaviors, and then go to the Choose a Sound Effect section for a given behavior, I click the File button under Source and the file I added isn't listed, nor is there any way to browse to one.
Is this a bug?
Thanks
推荐答案
当你进入行为设置你想要的一切,除了声音部分然后进入自定义代码并在最后添加一行如:
Game.PlayAudio('sound.wav');
When you go into the behavior set everything you want except the sound part then go into the custom code and add a line at the end like:
Game.PlayAudio('sound.wav');
这篇关于如何为行为添加自定义声音文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文