Why is my branch not working?

I am not sure why this branch is not working. As far as I can tell, the hit actor component is set to BP_Resource, but the boolean is set to false. Hello World does not trigger. The hit actor is set in the distinguish object function.

Here are some screenshots of the Blueprint and In-game result.

If you are going to compare without a pointer, I suggest you compare classes:

There is also the option to cast if you want to cover child classes.

3 Likes

Hey @mistaBang93! To piggyback Pezzott1 was saying, the == BP_Resource here is looking for a specific BP_Resource which in this case doesn’t exist, so the recommended way is either to go for the class itself as Pezzott1 shows, or cast to the BP_Resource attached to the hit actor.

3 Likes

This worked. Thank You. I do not think I will be using child classes for this blueprint, but it is good to know about casting in case I end up needing it in the future.

2 Likes