How do you use an overlap event from a different actor/blueprint?

I’m slightly confused as to what you want:

Do you want only a certain component to trigger an overlap event and then send the data that it has been overlapped to another blueprint? Or…?

Although I’ve managed to make a begin overlap from a separate trigger’s blueprint using casting, the problem is it triggers when any part of the actor collides with the trigger rather than just the component I need.

I tried making an overlap event from inside the components blueprint and copying it over to the one I want but that doesn’t seem to work, and although I made a variable relating to the component’s blueprint inside it and used that to get a matching getter, I can’t find any function to plug it into.

So is there any way I can plug a component from another blueprint like this into an overlap event?

Yeah, but I just don’t know how to put that overlap event into another blueprint.

why does it need to be in another blueprint?

Hey Robin

It sounds like you want to send a message to the actor that is overlapping the trigger volume? To the actual instance of the blueprint, once a certain component of that actor overlaps the trigger volume?

If that’s the case then you could make a BP that has a trigger as one of its components. Make an oncomponentbeginoverlap event node, and pull a wire off the “OtherComp” reference. Plug that into a getclass node, that goes into a class is child of node, if that is the class (of component) you want, then you cast the actor to the class (of actor) that you are looking for, and call a function in that class. Something like this;

Obviously I havent continued after the cast because I don’t know what you want to do, but if its a public function, you’ll be able to call it from the cast. So you could make a function in that actor class that accepts inputs if you want to send data to that class etc.

I hope I understood you correctly, let me know if thats what you were after!

Click the blueprints button above the viewport. Select “New Class Blueprint” and then select “Actor”. In the “Components” section of the Actor BP, click on “Add Component” and select either a box or sphere from the shapes section. Then add an event to that component.

Theres a little button just to the left of the minimize window at the top right of the editor. If you hover the cursor over it, it says “show available tutorials”. If you click on that there’s walkthroughs of the editor, blueprints etc. If you log in to the launcher, the “learn” tab has loads of videos for all sorts of subjects including Blueprints. Hope that helps!

That’s very helpful thank you, I think you understood me well.

My apologies I’m not very familiar with Unreal, but exactly how do I make an actor class for the component? I think that’s all I need and it looks like it’ll work fine. :slight_smile:

Thanks, though I’ve already done that for the actor with the component I’m using.

If I understand right the component is specified under “Parent Class” in the image you posted? Because what I mean to ask is how do I use the component as the purple data type the Class Is Child Of box uses?

The class would be sphere component I guess- in c++ it’s called USphereComponent

Actually it would be whatever component you want to detect. Use sphere component if you want the trigger actor to detect a sphere component on the other actor

???

I’m trying to use a component I’ve already made that’s part of another actor, which is light blue. But these component classes you’re talking about are purple!

Now I’m confused :S

It’s just an object variable I’m using in place of a different actor. I’ll show you what I mean:

I’m not at my desk, but I suspect the colour coding is the difference between a class and a variable. If this component is a variable, what class does it belong to? The tutorials are really good you know.

Morning! I’m in the UK by the way. I take it the blueprint you want to detect is the same as the blueprint that’s doing the detecting. Click on the Guard and in the details panel underneath there should be a “Variable Type”. Then click on the Parent class on the is child of node and you’ll get a very long list of all the available classes. Find the one you need.

Just as an exercise, make a new variable by clicking on the variable button top left. Now in the details panel click on Variable Type and you’ll see that there are sections for Object Reference and Class. If you open each in turn you’ll see that they’re the same, just colour coded differently. I’m sitting on a chair, which is an object, but also belongs to a class called “chair” If I want a new chair, what I need is a chair, but also the individual object that I’m sitting on is a chair.

Morning, same here. :slight_smile:

I couldn’t change the variable type because I’ve already compiled it with it in the blueprint, but I made another one as the purple class type. However… when I try to drag out the component from it as I did in the pic I posted with the blue object type, that component getter isn’t listed! So that takes me back to my first problem - I can make an event for the actor/object, but not the component!

And I don’t exactly know what you mean about blueprints detecting themselves but I should say all this is done inside a different blueprint than the one the variable is referencing, otherwise I would have just made the overlap event straight from the component itself!

I’m not saying change the variable type, I’m saying see what it is so you can choose the correct class type on the is child of node. Don’t plug anything in to the parent reference, just click on the parent reference and choose from the list.

Mate, you’ve got two threads going on the same thing, and on both it’s been said that you should do some tutorials.