Play animation on BoxTrigger

Hi guys,
recently I try to get one of my Hero Assets become to life.

For this, I added several animations via State Machine and so on - this works probably (I hope, because I cant test it).
Anyway - I want to play the animation, when the player enters the house.

For this I have added a BoxTrigger and refrenced it in the Level Blueprint via Begin Overlap.
In der character blueprint of the NPC I’ve added a boolean variable - for testing purpose this is linked to a print string.

Back in the Level Blueprint I cast my NPC blueprint and set my boolean … but nothing happens and I really don’t know why. I’ve spend now the whole day on it and I can’t get it to work.

What is the problem here?

Thans for your help!

The “InHouse” variable you are setting, is it the one in the Level BP or in GodsEye_NPC?

It seems to me that you are setting the “InHouse” of the GodsEye_NPC, but checking the “InHouse” of the level BP.

I am not a programmer by far, so sorry for the following explanation:

In my understand I do the following:
I added the variable in the GodsEye_NPC Blueprint to feed the branch node. This Boolean is driven by the BeginOverlap in the Level Blueprint. I get this Boolean by casting the Boolean from the NPC Blueprint and set it there on true.

Was this the answer for your question? :confused:

You should, when you character enter the box, update a variable into your character BP and then use it to update his animation, in his bp or is the animation bp (by casting to your character and getting your variable).

Okay, this the print string is working now and it sounds pretty obvious. Without a character, there is no overlap. But please explain the next steps a bit more.

I’ve added the inHouse variable to my fps character and set the boolean in the level blueprint. What now? How to drive the animation?

I got an email, that some of you answered - but I don’t see it here.
Am I the only one? Someone wrote, there is no boolean necessary etc, but I can’t find the post here.

Please repost it :slight_smile:

It is a good idea to make sure there are collision primitives on both the objects involved in the interaction, and that their collision channels match. It is possible to overlap or collide and not trigger a collision if their channels don’t match.

Ehm … I am not familiar with collision channels. I know there were like block all, pawn etc … but I really don’t know how to use them. Think of me as a total noob - I am a designer want to learn some programming and this is over my head - far over my head :smiley:

I would really appreciate you could illustrate your comment. This would be really helpful. Thanks :slight_smile: