Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Coppercube RPG Health /Stamina system

Seantes
Guest
Quote
2021-03-28 14:10:04

I'm making a video game in coppercube but now im facing a Problem that i dont know how to fix

First question:
Stamina system
How do i make a stamina system when a player runs the stamina wil value get lower and the player running speed wil also get lower when the player runs out of stamina?

Second question:
Health system
Is there a way that instead that a player get shot a player get hit by a enemie? And when a player get hit that the health value get lower and the player will be dead by value 0?


just_in_case
Moderator
Quote
2021-03-28 15:53:09

You can use variables for that, there are global variables for health and movement you can use that to compare the stamina and health.

Name of the variables are as follows.


[Hashtag]player.movementspeed
[Hashtag]player.health


Here hashtag is the hash symbol, and player is the name of te scenenode whose speed or health you want to compare.

And instead of using a scenenode as a bullet you can use shoot directly. And only shoot it when in proximity with the enemey so that it will act as a melle attack.
Once again you can use variables for that.

For example attach an on proximity do somthing to your behavior with the desired radius and then set a variable "shoot" with value "true" or "1".

Now attach another behavior when a key is pressed do something set whatever key you want it to use for shooting. Generally left mouse click.
And then attach an action if a variable has a value then do something.
Variable name "shoot"
Value "true"
And then attach the shoot action.
With setting direct hit no bullet.


This way you can acheive something like that.



Create reply:


Posted by: (you are not logged in)


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