Hello Robo. My name is Niven. I've been watching lots of your tutorials previously and I am a huge follower of your work, you do an excellent job with the Copper Cube 6 engine and I just really wanted to underline this statement as you motivate many developers using Copper Cube 6.
Well, what I am humbly asking is that if you can showcase the most simplistic stamina behavior, which can be used in game. Now, I know you would directly say the "Hadooken Health Bar" and pin-point me into that direction, but because I know your work, I am really asking if you can provide me with a generous sample of that or maybe if you can make a tutorial for it. It has been a while since I've been working on it and just can't figure out the right way to create that type of behavior.
I purchased this behavior and it is very useful, the reason why I am asking you specifically to make the "stamina" thing work. Thanks in advance. Cheers!
Edit: FYI, I don't want to sound weird, but just in case if you don't believe me about being a fan and a follower (which would be odd, because we have been chatting before) here is a screenshot of this specific behavior being purchased 20 days ago and me following you on this platform:
Viewing post in CopperCube - Terrain sounds comments
Hey Niven.
Thanks for the feedback - and purchase.
The new terrain walking API is out and I just now uploaded it here to itchio under that same asset you bought so have a look.
It comes with the ccb file and custom Behaviour all setup and working with terrain sounds....let me know if there are any problems.
For a simple stamina bar - create a 2d overlay based on percent is best.
The code is pretty simple -every 50ms or so:
var maxStamina = 4; // in this case 4% of screen width
var stamina = maxStamina;
if (playerStat == "run") {stamina -= 0.007;}
else if (playerStat == "walk") {stamina += 0.0024;}
else {stamina += 0.005;}
if (stamina > maxStamina) {stamina = maxStamina;}
if (stamina < 0) {stamina = 0;}
ccbSetSceneNodeProperty(stamN, "Width (percent)", stamina);
Thank you so much. I also redownloaded the CC upgrade for the terrain sounds.
You know, the variables are not my strongest suit. I did understand part of it, but maybe making a tutorial or a sample file would help more. I understand you are very busy, so there is no rush mate, take your time. It's just that practically I've tried using this and could not make anything. Mostly my fault lol, but yeah. Cheers!