To kill a mocking bird? Input doesn't work.

I have a crow character I’d like to destroy when I press “E” in a certain sphere collision. The blueprint contains both ai roam and separet function to destroy the bird. But bird only roams and I can not destroy it when I press “E”.


Your crow needs to have input enabled for player 0, in the class settings I think.

You should handle the keypress in your player though and destroy the crow from there.

found some input info there and played with it a little. Nothing works. But If I use player blueprint I need to use multpile get actor of class and can’t use e for different actions. Basicly this works like every blueprint does different stuff when pressed E.

Btw I made a door with the same system in a different bp and it works fine. That was an actor bp. This one is character but the input doesn’t work this time.

Any ideas,anyone?

Do you inputs inside of you player controller and then call the destroy on the bird through a function.

You can only invoke player inputs if you force input for player 0 or if the bird is possessed by your controller.

hmm I need to dwell on what you said cause I lack knowledge about it. Never used functions before. Ty. I have a similar bp for a door. It works. I thought it is because of bp class.One is actor other is character bp. But eventually thought about ai possessing it too.

Now I made the input in level pb to call a kill event existing in crow but another problem arouse. When I spawn the same crow bp in the world multiple times, I can destroy it but not the one I want. It doesn’t destroy the one I am standing in its collision.Instead it destroys the one first spawned. It destroys the crows in the order I spawned them. :smiley: Any fixes?

Make a reference variable of the crow blueprint. Make it so the once you overlap the crow collision it sets the crow variable. The call the kill command on this variable.

hmmm I am no expert so I need time to try implenmenting this.

do you mean like a bool? Currentlıy I have bools to activate the nodes but I think you are talking about something else

No, a reference to the the actor type that you want to destroy.

thanks I will look into it and bother you once more later :smiley:

Sorry to bother but is there an example blueprint I can check and figure out? Right now I am all lost.



mocking.zip (68.9 KB)

You could also just have 1 overlap where in the character and cast to crow adding / removing from the array.

interesting… thanks a lot man. Gonna work on it a little bit

I think I am doing something wrong. I can not get the kill function like you do in the picture also can’t get the crows variable created in character bp to crow bp

You need to create it by clicking the + sign near function (left side of screen) and giving it the name “Kill”

I did that already but the thing is when you need to get a event from a bp you use get actor of class then proceed. With this function I can not get it directly like the way you did it in the screenshot of yours.

I do not use get actor of class anywhere in the project. The array elements are set by the crows themselves when their sphere’s overlap the player character. (they pass themselves to the array inside of the character)