Why won't the sprint function stop working when the stamina bar reaches 0?

Quick question related to the jumping function. I tried to the same sprinting method that you showed me for the jumping, which works fine when you jump for the first time. However, I somehow can’t jump afterwards though. 420 for the Zvelocity is the default for my character movement.

][1]

That has to do with your menu. You could try to print the value of this variable and check if it changes on button press.

Because right now you are not checking for stamina (you only reduce it. You will still be able to jump once you are at 0 or below 0 stamina).

I am very confused right now…I have no idea on how to fix the jumping function.

Ah wait wait wait wait wait.

I only looked at the lower part with the “Jump” comment.

Scrap the whole upper part. You could add another bool to your other stamina generation and only generate stamina if both are false but all you need is the lower part. You can just delete everything else. Check for your stamina value right before the “Jump” function and you’re already good to go!

I’m still very confused. :frowning: Could you give me step by step guide on how to fix the jumping function?

So this is the only section I should focus on? Should I delete the other section above it?

So I got jumping and sprinting (so the whole stamina thing) finished:

Magicka will have to wait till tomorrow.

I just followed the tutorial that you provided, but now for some reason the sprint function won’t work. The jumping function works completely fine, but sadly more errors had to occur. I was wondering if you could tell me why the sprinting function isn’t working? Thank you for your help! :slight_smile:

28158-capture1.png

I have provided 2 screen captures.

Update: Fixed the sprinting issue now. I deleted the sprinting cost variable from the <= float, and for some reason the sprinting function started working. Your video that you made was very informative, and I can’t thank you enough. I’m looking forward to the magicka video that you’ll be uploading.

Yes, I am using values between 0 and 1. What values would you recommend? Yes, I would like to implement that different spells cost different amount of magicka. I’ve been watching a few videos that Tesla has made, and I have recently followed a tutorial where he explained how to create a night scene. The inventory that I have right now was from a tutorial that I watched from the Unreal Engine YouTube channel. I’m currently studying a BTEC level 3 games development course, but I’ll be starting university in September if I get the required grades. :slight_smile:

Have you checked which value you have in your sprinting cost and are you still using those values between 0 and 1? Because this might be causing some issues.

I always use other values because they allow more fine tuning especially in form of power ups and other stat gains.

And yea. Magicka is pretty straight forward. Though one question for that:

Are you planning on doing different magicka costs? Because this would require a slightly different approach as I used so far and also gets really quickly a lot more complicated.

Over all I’d suggest watching through all the videos from unreal engine and maybe some from tesla as he makes a lot of great tutorials as well and they give you a lot of background knowledge about a lot of stuff which is rather hard to explain in a text post. Especially with such a big scope :wink:

I’d recommend “speaking” values. With that I mean values which actually make sense for people. Like for example if I’d tell you that a spell costs 0.1 mana that is kinda weird. 10 sounds a lot better. And because you hardcap between 0 and 1 you can hardly change the maximum values without doing those changes anyway. The main thing you’ll run into is with the progress bar. But simply dividing the current value by the max value gives you again a number between 0 and 1 for it so that’s no real issue.

And here’s the magicka video:

Oh, I get what you mean. ^^ I just returned home from college, but now I’m going to start the tutorial that you provided. Thank you so much again. I’ll post another comment if I get stuck with anything. ^^

When I’m created the blueprint structure, and then attempted to create a master projectile the class isn’t showing up. Do you know the issue here?

Ah my bad. The master projectile class has no real function in my example. It’s an actor blueprint without anything.

However the actualProjectile bp is a child of it. You create a child by creating a normal bp but instead of selecting actor or anything like that you expand the “Advanced” tab (at least I think that’s what it’s called… below the basic classes you can expend something) and search for your parent BP.

You could just do it by selecting actor instead of master but it’s a better structure and you can just add in your master BP all values and functions which every projectile should have. Quite convenient.

Just the basic object orientated programming.

Just ran into a constraint. :frowning: I try to open my character blueprints, but the window won’t open. Is there a way I can fix this?

Fixed the previous issue, but now whenever I tired to connect break spell to spawnactor it creates a get class node. This is completely different from your tutorial, and I was wondering if I’ve done something wrong??

try* Sorry for the typo error. :stuck_out_tongue:

I’m so retarded. I just figured out the reason why I wasn’t able to connect break spell to the spawn actor. I used an actor object reference instead of an actor class. :frowning:

Just finished following the tutorial that you provided. I have 3 different particle systems set up already, but I would prefer it if you used 1,2 and 3 to cast different spells.Essentially I would like to press 1 to cast fire, press 2 to cast sparks and press 3 to cast steam. Quick questions: How would I implement that? Thank you for your help! :slight_smile: