Hi,
i made cutom event in separate blueprint (Img 1)
but what i want is in characters blueprint i have made a collisionSphere and i want the custom event to be triggered when that BeginOverlap happens. but when i connect them i get a error (Img 2).
what can i do to make this happen.
Thanks.
Steffan.
You can’t call another blueprint’s event (or function) like that. At the very least you need a reference to an object of the class containing the event.
If it’s the other actor involved in the Overlap, you can use a Cast node to cast OtherActor to the correct class, then pass the result into the event’s Target input.
Otherwise, you’ll need to use the GetAllActorsOfClass node (choose the class containing the “TrackPlayer” event as class type), Get the first element of the returned array and call the event using that.
hey i didnt get the latter part. can u explain it to me how to do it.
um bit new to UE.
Thanks.
Note that GetAllActorsOfClass literally loops over all actors in the map, so it’s a bit expensive. Calling it on overlap should be okay (unless that happens a lot) but if you need the actor a lot, you might want to store it in a variable instead.
Hey Buddy Thanks a lot for the support.
.
Appreciate it.