Initialize object of custom class from blueprint

Hi guys,

I’ve created a C++ class called “Item” that holds an array of another class of mine, named “ItemEvent”. This works fine if I add events via C++, but for ease of use I’m trying to enable the addition of events via blueprint also.

I have several blueprints that derive from “item”. Item has a function named “AddEvent” which accepts a pointer to an ItemEvent and simply adds it to the existing TArray. My issue is that, when I create new variables in my blueprint of my various ItemEvent types, they are never initialized by default.

I have begun trying to call the following node on the BeginPlay event to initialize these objects:

My issue is that this does not work, and provides the following error:

https://forums.unrealengine.com/attachment.php?attachmentid=114349&d=1476830567

The object “SwingOneHandedWeaponEvent” is a really simply C++ class derived from ItemEvent. No matter which class I pick here, I seemingly always get the “wrong class to spawn” error.

Am I going about this incorrectly? All I wish to achieve here is to initialize the variables that I include on my blueprint when the object is created at runtime, so when I access them later they are not null.

Any and all help would be greatly appreciated!