Bad reference variable in blueprint

Hello everyone,

I’m writing this post because i’ve been stuck for few hours for now. I’m trying to follow this tutorial : Unreal Engine 4 2D Fighting Game Lesson 01 : Setting the Scene - YouTube , and at the 3rd episode, i got the error message that bothers me.


This is the error message that i got. It comes from this part of the blueprint:

Char 2 is a variable that is a reference of 2DSidescroller 1 wich is a replicate of 2dSidescroller, the basic blueprint class that can be playable in a 2d-sidescroller with starter content.

The thing is that in the tutorial we are doing a method to spawn the second caracter, however, with a print string function the Char 2 variable does really not exist.


(the Char 2 doesn’t work so the spawnpoint of the second playable caracter isn’t working.)

I hope that i’m clear enough, and i’d be happy to add more explanations to my problem.
Best regards,

What it’s saying is ‘your variable is not pointing at anything’.

Yes, you have a variable of the correct type, but you have not assigned it to the actual player.

One ( of many ) way would be

image

Of course, you’d cast to your player type…

1 Like