Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hello, and happy new year! I have this problem, i set and change a variable called totalEnemy in my scene behavior, in the behavior "every few seconds do something". I would like to know if I can access this variable in javascript so I can use it ? |
||||
|
yes, you can use the javascript command, ccbGetCopperCubeVariable("totalEnemy")to get it in javascript., you can also set the variable that way, just go through CC Javascript documentation to see the available commands list. |
||||
|
thanks, it works. It was to try to figure out why my cloned enemy share the same health as the original, because when I kill a clone, the original and all other clones die at the same time. I searched on the forum, but I'm not sure I understand. Although I'm sure this subject was brought many time before. I don't know I'm gonna search again. Edit: I'm gonna create another tread to ask for my problem. Thanks for solving this one. |
|