Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Delete Cloned Node

Chester
Guest
Quote
2023-03-16 21:58:04

How does one identify a specific cloned node and delete it?


dynamogames
Registered User
Quote
2023-03-16 22:21:05

I think its better to change the name of the cloned node and give a name unique to each cloned object or number it like this: Object1, Object 2, Object 3, etc...
This way, I think it would be easier to identify the nodes.
To delete the node, just use "Delete Scene Node" action of CopperCube and click the node you want to delete and you can also set a specific time of deletion if you want.


Chester
Guest
Quote
2023-03-16 23:26:09

Hi, thanks for the response.... but I would like to delete the node via javascript by identifying the specific node.

Is there a way of identifying the node through code?


sven
Registered User
Quote
2023-03-16 23:51:51

Chester wrote:
Hi, thanks for the response.... but I would like to delete the node via javascript by identifying the specific node.

Is there a way of identifying the node through code?



if you clone node and set its name as dynamogames mentioned..
then you can delete any of them with code by getting its ID by name..

var s = ccbGetSceneNodeFromName("Object1");
ccbRemoveSceneNode(s );

you can get all of them by using FOR loop.

FOR i=first TO max
var s = ccbGetSceneNodeFromName("Object" +i);
ccbRemoveSceneNode(s );
NEXT


Guest
Guest
Quote
2023-03-17 00:04:31

Here's an example file of me changing the name of a cloned node and identifying it on click. All you need to do is run the project and click the cubes to see their names. Then you can use the ccbRemoveSceneNode() like Sven mentions. Without any more details as to what you are actually doing it's kind of hard to answer this question. I can think of other ways to do this, too.

https://files.catbox.moe/wygis7....


Chester
Guest
Quote
2023-03-17 11:12:48

Tnx!


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