≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
CurrentNode's name from action
Posted by:
(you are not logged in)
Enter the missing letter in: "I?ternational"
(you are not logged in)
Text:
[quote][b][/b] wrote: @hadoken [code]ccbGetCurrentNode()[/code] only works in execute javascript action. To get the current node in the action you can simply use "currentNode" so your action will look like this. If you want you can use 'currentNode' directly to get the property, you don't have to define it as a variable. [code]/* <action jsname="action_PrintCurrentNodeName" description="print name of current scene node"> </action> */ action_PrintCurrentNodeName = function() { }; action_PrintCurrentNodeName.prototype.execute = function(currentNode) { var node = currentNode; var name = ccbGetSceneNodeProperty(node, "Name"); //var name = ccbGetSceneNodeProperty(currentNode, "Name"); // remove the above 2 lines and uncomment this line's code. print("current name= "+ name); };[/code] you can use this to print the name of the current scene node. *holy**holy**holy*[/quote]
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