Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Add Health on when key pressed

faith_254
Registered User
Quote
2018-08-20 08:11:10

hi, all i was wondering if anyone could give me a way of like wen a key pressed add health to your player, or create a pick up of health in my game but i need it to add health to player
any thoughts???


just_in_case
Moderator
Quote
2018-08-20 19:52:39

Use the global health variable...
For example on proximity with a health pickup...

Set or change variable "hashtagplayer.health" (here hashtag is the hash symbol and player is the name of your scenenode whose health you want to recover) set the value to 100 or use add and add by whatever value you want like 20,50 etc... Whatever value you want...

You can also use the same method with on key pressed instead of the proximity behaviour..

Note:- the player must have behaviour with health and ai attached to it..


Create reply:


Posted by: (you are not logged in)


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