Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
SoundFileName - Propert does not exist

DouweDabbe
Guest
Quote
2022-01-10 04:24:00

i Have a folder node
containing the cc editors sound object prefabs holding soundfiles

for (let i=0; i< itemCount: i++) {
child = ccbChildSceneNode(folderNode, i);
strSFName = ccbGetSceneNodeProperty(child, "SoundFileName");
print("strSFName="+strSFName); <=== Bug: Property does not exist
myArray.push(ccbGetSceneNodeProperty(child, "SoundFileName") );
}

what am i doing wrong here ?
properties window says there is a property "SoundFileName"
my array = false, false etc


just_in_case
Moderator
Quote
2022-01-10 06:09:22

Well, you have a mistake in the line when you are getting the Child node.

you have should have used it like this ccbGetChildSceneNode() you might have forgot to put "Get" there, that was resulting in no sound file, means there is no SoundFileName property exist.

here is updated code if you want.


var folderNode = ccbGetSceneNodeFromName("folder");
var myArray = [];
var itemCount = ccbGetSceneNodeChildCount(folderNode);

for (var i=0; i< itemCount; i++)
{
child = ccbGetChildSceneNode(folderNode, i);
var strSFName = ccbGetSceneNodeProperty(child, "SoundFileName");
print("strSFName="+strSFName);
myArray.push(ccbGetSceneNodeProperty(child, "SoundFileName") );
};


hope that helps



DouweDabbe
Guest
Quote
2022-01-10 22:41:13

i work ofline so cant easyly copy paste code fragments.
have to type them into a tv.
so the missing "Get" is a typo or a AI correction.

I tend to oversee such mistakes easily, therefore I copy most of the statement from helpfiles and code snippets.

Currently I have a lot of weird bugs.
- yesterday it did not know the "SoundFileName" property. have not tried a gain as the code changed a lot.
- A working script stops working after some small redactions.
- Sound will not play in cc editor but in every other app is fine.
- a day later Sound will play in the CC editor but not in the windows exe cant test in the other outputs.
- before also many times it will say it does not know this or that ccbCommand.

Maybe somebody bugging me through the SmartMeters they have here. Then I better start finding a new non electric hobby.

It is annoying as I was putting some finishing touches to a bunch of scripts i wrote:

- a tooltip
- a camera shake
- a piano app
- a 2d animated dice
- a sliding gauge for sound and other controls
- a rotating knob control
- a car steering wheel with moving hands that follow rim of steering wheel


Thanks for looking into my problem.


just_in_case
Moderator
Quote
2022-01-11 16:26:45

Coppercube Documentation does work in offline mode, if you open it through the editor, by going into help then documenation.
Don't worry about the typo everybody makes such mistakes, sometimes it takes me hours to figure out a typo in my codes.

Regarding the sound issue, can't really tell without looking into the actual ccb file.
Maybe you have turned off the editor sound from the sound manages window. That is why it was working in the exe but not in the editor.
Or mayb you have changed the actual location of the sound file from the hard disk that is why they are no longer working in the exe.

Ahaaan, I still remember doing such things in past in my early days in CopperCube, I used to do all the above things that you have mentioned. You might have seen some of them in my demos too.

I will soon reupload the relax melodies tutorial on neophyte.cf I liked that android app and I found it interesting while making it.

I did created a piano app, but unfortunately I lost the project files during the ransomware attack.

You can still download my Ludo (incomplete) demo there is a working dice there.

I mean there are lot of things you can grab from some of my demos if you don't want to them on your own. It might save you sometime for your project.

If you have seen my gta clone example then you have noticed the steering hand animation too for the car driving. When you turn left or right the hands on the steering animated accordingly.

Hope you will finish your project soon. And CopperCube's really works well when offline...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© 2020 Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact