Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Player Health!!!

areibma
Registered User
Quote
2017-04-16 12:41:57

Hi,
Is it possible to access the player health with javascript? Whatever I tried it always return NaN.

Thanks.


just_in_case
Moderator
Quote
2017-04-16 16:23:44

Yeah you can acess that, only if you know the name of the player scenenode...

For example if your player name is 'ghost' then you can acess the health variable by this....

 ccbgetcoppercubevariable ('ghost.health')


Remember there is hash before the ghost.health and always remember to use quotes...

Thats it ... Now you can acess the variable..


areibma
Registered User
Quote
2017-04-16 21:24:00

thanks, I was pulling my hair but never thought about this method.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internatio?al" (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