Interface Doesnt Seem To Work

Hi i am trying to create an interface that has a single function in it. This function creates an event within a blueprint actor, which only gets called once another blueprint actor is destroyed.

I am trying to do this for 2 hours and I cant seem to find the issue, but no matter what I do, the print from my event node is never getting triggered.
This is the interface:


This is the “outage” blueprint. In here, Id like to have the function to destroy some lights and an audio actor, but its not even firing the print at any given time (interface is added in class)

And this is here is the fusebox blueprint. Its a different object within my scene and once the player throws something against it, it explodes.

All of that works fine, but the create outage event message is doing nothing. I also tried to add the interface here, but no matter which node I tried, the BP_Outage never did its event thing. Could someone tell me what I am doing wrong here?

1 Like

From your pics, I’d say the BPOutage reference is not assigned properly.

Are you getting ‘none’ errors when you stop playing?

Hi!
Nope, absolutely no errors - Here is the variable that I used;

I also put the red node (event create outage) inside my fusebox with a print, but this one also doesnt fire or give me an error, its just doing nothing

But your BPOutage is of type actor, and this is an object reference?..

You need an actor reference.


I have changed the variable, but still, the print of the event isnt showing up…

I also tried these nodes, but to no avail

PS: the errors from the pic are not from these blueprints or this error

Interfaces send a signal to an actor.

You can get a reference by using

image

1 Like

Perfect! Thanks! But why was my way of using the variable above not working? Isnt that a viable reference to an actor?

When it was an object, no :slight_smile:

When it was an actor reference, it’s the correct type, but it still needs assigning. It needs to point at the exact BP you want to talk to, the type is not enough.

For all the engine knows, you might have 500 BPOutage blueprints in the level, it needs to know which one.

If you are putting the BP that’s making the call in the level, then you can assign the reference by making it ‘instance editable’ ( click the eye next to the variable ) and using the eye dropper tool on the BP in the level.

Otherwise, you have to set it at runtime, like we did.

Do you get it? :slight_smile:

1 Like

Absolutely, than you so much! You saved my day! :smiley:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.