Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
?resolved? I'm just starting to learn how to use if. I introduced a sound effect to my gun,But there was no sound during the test ![]() The reason is that the sound effect, I can play it but can't use it (PS:This is a machine translation sentence.Please forgive me) |
||||
|
To add,i'm sure that the .wav file is OK |
||||
|
Some sound problems come from changing the default directory location, depends I think on what play type you have used - ie javascript or embedded. I would use the basic javascript to start with ccbPlaySound("xyz") |
||||
|
Can you upload the wav and the ccb project file in a zip please? |
||||
|
VP wrote: Can you upload the wav and the ccb project file in a zip please? OK.....sorry...How do i upload it? (embarrasssed) |
||||
|
This forum doesn't accept file uploads.... but you can upload the zip or 7z to somewhere like mega.nz - then paste the link in a comment here. |
||||
|
?????:??????????....??????zip?7z???mega.nz?????——???????????????[/quote] Oh, thank you. Please wait for me. |
||||
|
VP wrote: This forum doesn't accept file uploads.... but you can upload the zip or 7z to somewhere like mega.nz - then paste the link in a comment here. https://mega.nz/confirmQ29uZmlybUNvZGVWMiqDiZWXDAAMAEckix_VaTEzNjE5ODQyNDhAcXEuY29tCUppbk1pbmcgSmlVeBCypuhQjA |
||||
|
Can you post the download link for the file instead please? I think the link you have posted is for the account login. |
||||
|
VP wrote: Can you post the download link for the file instead please? I think the link you have posted is for the account login. oh..oh...sorry,This wetransfer is much more convenient for me https://we.tl/t-Gz8s5i8EqQ It's not just the sound effect of the gun. My copper cube doesn't make any sound |
||||
|
VP wrote: Can you post the download link for the file instead please? I think the link you have posted is for the account login. Thank you, man? Problem solved |
||||
|
It is always wise to use javascript commands to load and play sounds, along with the 3D nodes. You can use this command to change your working directory if you want ccbSetWorkingDirectory("DirectoryName") generally, your project folder is your working directory. You can create other folders and use them as your current working directory. or if you want you can skip the above command and simply creates a sound folder in your project directory and with the help of javascript load all the sound files from in there. you can Also utilize the sound nodes configuration to change their sound playback from "nothing /play once/ or loop" but as the sound file doesn't get embedded in the ccb file properly I found it better to play sound using the javascript code. @niko should provide an option to save the soundfile just like the texture or allow embedding it in the project properly. |
||||
|
AFAIK embedding soundfiles into CopperCube projects should be possible by adding a 3D sound node (which can also be set to "PlayAs2D") to your project. Don't leave the SoundFileName field empty and don't load/assign your soundfile at runtime for the first time. For a working embedding process without the need of some extra soundfiles next to your published project file (e.g. .exe file) the sound file loading has to be done already in the editor. Initially mute it by setting the PlayMode to "nothing" in the editor and later change the sound node's PlayMode at runtime on demand for your needs. |
||||
|
3D sounds node does get embedded to the project but when you publish the game with that project and the sound file doesn't exist in the location, it will not get played in the published exe. However you will still be able to hear the sound in the editor that is why I said it doesn't get embedded properly. I know that 3D sounds gets embedded in the project but if you transfer that project to another pc and the original soundfile doesn't exist on the system. Then the sound will not be played in the published exe. |
||||
|
you are right @just_in_case properly done we can embed sound into compiled exe but at the moment we can not bundle sound into transferable, re-editable CopperCube project files without the need for adding extra sound files - second fact should be clarified by now ![]() |
|