Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Change fog colour by command?

veganpete
Registered User
Quote
2020-08-24 19:22:51

[SOLVED]

Hi, just wondering if there is a command to change the fog colour please?

At the moment, I'm placing a transparent 2D plane over the play-field which I can enable/disable visibly. It actually looks OK but might be better if I can change the fog color, triggered by an event. Is that at all possible?

*I'm thinking something along the lines of...

var f = ccbGetSceneNodeFromName("Level 1");
ccbSetSceneNodeProperty(f, "FogColour", 99,14,20);

...but I can't get it to work. Would appreciate any help.

Thank you.


veganpete
Registered User
Quote
2020-08-24 22:24:07

Solved it by adding the following script...

var root = ccbGetRootSceneNode();
ccbSetSceneNodeProperty(root, "FogColor", 20,45,79);




dlx
Registered User
Quote
2020-08-27 01:33:40

it is good to always study the documentation


veganpete
Registered User
Quote
2020-08-27 10:08:14

Thanks, but the documentation doesn't actually explain how to change fog colour or fog depth dynamically...

https://ambiera.com/coppercube/doc/index.html


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Intern?tional" (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