Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
how to do these things????

just_in_case
Moderator
Quote
2016-03-29 19:55:36

Last night i was busy with coppercube creating a game and want to add custom mouse cursor to it...

Also want to add an option to control sound or music volume for my game...

controller setting option to redefine controls

Any idea how to do all this...

Thanks!!


pmax
Registered User
Quote
2016-03-29 20:30:59

It should be enough to launch this javascript code to change the sound volume.
var s = ccbGetSceneNodeFromName("Sound1");
ccbSetSceneNodeProperty(s, "Volume",20);



just_in_case
Moderator
Quote
2016-03-31 15:47:18

I know that how to adjust volume of a single sound file... But what if my game consist of 100 of sfx and music ...

I want global variable /function to stop increase or decrease sound volume...

Anyway thanks for your reply...


tim12345
Guest
Quote
2016-03-31 16:27:23

from documentation:

System Variables: The variables below this line are not part of a scene node, but always attached to an object named 'system'. Access them using system.attribute, for example system.soundvolume
soundvolume Use the system variable system.soundvolume to change the global sound volume, of all sounds for the app. Has a value between 0 for quite to 100 for "full volume".


just_in_case
Moderator
Quote
2016-04-01 07:05:25

@ tim12345 thanks that helps me a lot...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "I?ternational" (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© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact