VertexZero's Recent Forum Activity

  • Nevermind, and thanks again. I reorganized my code based on the previous help and took the time to see where the problems lied.

    Cheers!

  • Sorry for the shameless bump!

  • LittleStain, you are right. I added the bar update with the values twice. Should instead stay in the HUD sheet. My idea is to deal with the values (since later they will be modified by a simple level up system). The way I understand it, I should add my variables and then update the bar with the values based off currentStamina and maxStamina.

    The reason I added a Stamina Consumption sheet is mainly because every action uses a different amount of stamina. Some actions use a constant value and others such as running are based on the duration of the action.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I updated the main post since I don't seem to be getting anywhere. I can get it working directly on the bar, but not by using variables.

  • Saw your comment after I had posted! Thanks, now it makes sense.

    Thanks!

  • caiorosisca

    Just one small question. I understand that maxStamina is a global variable, but how do I use currentStamina?

    Presently, the stamina consumption while the player runs is a simple runStaminaCost * Time, so lets say I run a bit, how exactly do I update this into the Stam Bar?

    Cheers

  • caiorosisca

    Thanks for the tips and great help. This helped me understand a few features and re-organize my code.

    The problem was indeed really small and mostly because of the order everything was.

    Thanks!!

    Cheers

  • Shameless bump. Anyone?

  • Actually I discovered that after doing a walljump, everything goes back to normal. Even weirder lol

  • Ok, so I tried using a global variable and set it initially to 0 and then to 1 once once the character is running. Then, once it jumps set it back to 0. But I still have the same problem. There's no problem with the stamina recovery until I jump. But I still cant figure out what's causing that. All I know is that somehow after jumping the player is not going back to its initial state.

  • Hey thanks for the reply, now its kinda late but Ill be trying that tomorrow after work. I didn't do it exactly the same way so chances are that this might work better. Thanks!

  • Hi!

    I'm presently adding a stamina system in my project and I ran into a problem: Once the Player jumps, stamina begins to recover. I tried different things but nothing seems to work and I'm sure I'm overlooking something.

    Here is the link to the capx file. Thanks in advance!

    https://www.dropbox.com/s/gassgl8hwgvfyqk/test_02.capx

    Cheers

    controls: right and left arrows to run, up arrow to jump.

VertexZero's avatar

VertexZero

Member since 13 May, 2013

Twitter
VertexZero has 1 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

15/44
How to earn trophies