Download

Can't pass variable between 2 class blueprints - almost there I think...

I am going around in circles here, and can’t get this simple task to work. I am creating an object that when touched increases the score by 1. (Right now I just want a basic screen log to test functionality).

I have a “jewel” actor class that has the jewel mesh (cylinder for now):

theJewel.PNG

In this jewel class I have:

b116c54136a1a92a5464377c26b2ec314f6ddafe.png

When I walk into the cylinder the hit node IS firing, and is animating into my jewelUp custom event. My jewelup custom event was created in a “jewelScoreboard” class blueprint to handle the scoring. I made a variable that I arbitrarily called the same name as the “jewelScorboard” class (and made it the object type “jewelScoreboard”) so I could finally find my custom event in it. Is this correct? Is this the issue? If so how can I make this functional?

My jewel scoreboard class that is NOT firing:

e109b100d131f0815c9455a4dc30c0a025a175da.png

I have watched a number of videos, and I am pausing, checking their nodes and menus, and I just can’t get it. I think I have done everything from the http://www.youtube.com/watch?v=xu1a9jFZc7g by Unreal itself, but the author glosses over the point of connecting the two blueprints together. Something about making an object variable with the type of the other blueprint to access its custom events?

Please help me on a Monday, take pity!

Have you spawned the actor Jewel Scoreboard?

Interesting…no. How can I spawn an actor that simply is used for non-visual score keeping?

I read up and tried to add it to the level blueprint like this:

spawnedScoreboard.PNG

I had to put a random variable for spawn transform in so that it would compile without errors - but I figured this was ok as this is not visual in level, but just a class to hook to. It didn’t work.

I am closer…, thanks DarkHorror - now what?

GOT IT.

Thanks DarkHorror - you pushed me in the right direction. Good luck with figuring out the HUD / Hit box issue.

Later,

Good to hear you were able to figure it out