"Add Component" node on Actor Blueprint doesn't work at Begin Play?

I created an Actor and all it does is call “Add Component → Custom” node on Begin Play to spawn an ActorComponent called “TestComponent”. All the TestComponent does is print “I’m a component” on screen.

http://puu.sh/lOuVT/72065847d1.jpg

This isn’t working, the Test Component won’t print anything.

But I found that if call the Add Component node at any other time later than Begin Play, then it does work. For example, simply adding a Delay node like this will work:

http://puu.sh/lOvBD/09fb077935.jpg

This will work perfectly, the Test Component will print its thing. Calling the Add Component node on a different Actor instead of on “self” will also work fine.

Is this a bug or is there something fundamental about the Add Component node that I don’t understand? I also wanted to use the Add Component node before the Begin Play event on the Construction Script, but because of this problem I cannot get it to work no matter what. Is that not possible to do?

Hello,

It isn’t actually that the component isn’t being added, it is that the component’s begin play isn’t being called. You can add a custom event to your component blueprint and then call that custom event after your Add Component node. So your setup would look something like this inside of your Actor Blueprint:

Let me know how that works out for you, or if you have any additional questions.