≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
that's how you can setup custom health bar
Posted by:
(you are not logged in)
Enter the missing letter in: "Internation?l"
(you are not logged in)
Text:
[quote][b][/b] wrote: [quote][b]DouweDabbe[/b] wrote: How do I access thru some interchangable variable the health of a bunch of players? "=||=someplayer.health" String.fromCharCode(35) you can replace with =||= if you want but not needed. //this will be the name of variable. var a = String.fromCharCode(35) + ccbGetSceneNodeProperty(this.node,"Name") + ".health"; //this will be the value of variable. var b=ccbGetCopperCubeVariable(a); make sure to print it .. so you see if name is correct and does value responds to it. print( "Name " +a +" value " +b); to scan a punch of nodes you can use numbers in names and use it like this.. i used to use AI1 AI2..and so on And in for loop i just included name "AI"+i OR scan folder.. var max = ccbGetSceneNodeChildCount(ccbGetSceneNodeFromName("FolderName")); for (var i = 0; i < max; i++) { var t = ccbGetChildSceneNode(ccbGetSceneNodeFromName("FolderName"),i); var current_name=ccbGetSceneNodeProperty(t,"Name"); } ((nodes must be in FolderName folder and will be scanned)) (i didnt test this script so may include errors but should give idea of it)[/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