Why doesn’t my Nitro bar want to drain?

Hello, I am developing a racing game and I implemented a Nitro system from these tutorials : https://youtu.be/So8sLa1bYNA?feature=shared
https://youtu.be/9o-Jix3QTSs?feature=shared
https://youtu.be/A8QG5iZMYFE?feature=shared



So I followed these tutorials and I coded a Nitro system with a limitation represented by a bar and normally logically when the player activates the nitro the bar should logically go down but when I test this at the viewport the bar does not empty.

When I leave the viewport, I have this error message that appears so if you have an idea on how to solve this problem it would help me a lot.


Blueprint Runtime error screenshot part 2

At a glance:

Instead of using the actual movement component, you created a null reference variable.

I tried with this component but when I want to link the nodes I have an error message that says it is not compatible.

But you followed a tutorial, right? How do they make it work?


If you want to use this component:

It has to have the expected functionality; it will either need to be the component class or, at least, inherit from it. You can’t add a random component reference (and that’s even besides it being null) and expect it to work.

Have a look at the tut again - how do they do it? Are the tutorials a cohesive series? Or you’re combining unrelated tuts?

I followed the tutorial series and at one point the one who made the tutorial from a cast it promoted in variable and then used it to code the Nitro.

Is this your script here or theirs?

  • if it’s yours - does the cast fail?
  • if it’s theirs - can we see your version?

There it is my script the cast does not work

1 Like

Hm, I don’t buy it. Could you confirm this is actually connected in the tutorial:

Is the function in the component?!


the cast does not work

Can you confirm that when you do this:

The cast actually fails and Prints on your end?


I went to check in the tutorial and going back to my code I made the mistake of connecting the set chaos vehicule à la with the node object function Update NOS level so I disconnected the link with the node with the object.

After that I went back into the viewport to test and the nitro bar emptied normally.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.