Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi, I try to make a scenenode visible when a function (wrote in CL) has been triggered. Is there some kind of reverse method that lets me use CopperCube-actions when this function in the code is called? Otherwise I have to script it all in CL. Thats what I have so far but it isn´t working: var onoverlay = function(o) { Maybe somebody got a hint? |
||||
|
Try using yourNode.Visible = false; It's all listed here: http://www.ambiera.com/copperlic... |
||||
|
Thanks erik.. I wish there were some short examples in the documentation - could be helpful. It sounds plausible but it isn´t working for me. Here is my code: I figured that it isn´t getting past "alert 2" - so there has to be something wrong with the "scene.getSceneNodeFromName('node1');"-part Any ideas? Ps: I m using the copperlicht.js-file from the CC-version 2.5.3 - in case that matters somehow.. Thx |
||||
|
The variable 'scene' is not global, and you cannot access it there. I guess your browser also would have told you that if you would have looked into the JavaScript console. :) |
||||
|
True. Making the variable global did the trick.. From there on it took me a while to figure I spelled "visible" instead of "Visible".. My bad.. |
||||
|
How could I possibly make a 2Doverlay dissappear after e.g. 10sec?! I find it hard to figure out since there are no tuts about this.. I wouldn´t like to show what I got so far because its ridiculous :) Somebody got an idea? |
||||
|
Create a 'every few seconds do something' event, and either set it to 10 seconds or set it to 1 second and let it count a variable up. If you use the second method, add a second action to it, making the object invisible if the variable is bigger than 10 (the 'if'-part is also an action). |
||||
|
Cool.. Thanks. With variables its working well |
||||
|
|