How to cast to an actor with a certain variable value?

You need a reference to the door. If your door is a BP and placed the door in the world, then you can make a variable of that type in the switch BP and click the eye to expose it in the editor.

when you place that bp in the level, you will be able to set that variable in the details panel. You canselect a door in the level with the eyedropper.

You could also, get all actors of class like this:

either way, you need a reference to the door. Other options would be an interface or event dispatcher.

Hope that helps! GL!

I’ve been looking for an answer to this a lot, but couldn’t find anything useful. Basically, I’m trying to make a system where a switch actor is supposed to activate a door actor. Doors and switches are connected with an “ID” that is an instance editable integer variable. Switches are supposed to activate doors with the same value. The problem is that I can’t find anything to plug into the Cast node that will specify the actor with that integer.

I probably don’t need the part that checks if the values are equal if I can get that to work

As the above poster mentioned you need a reference for this to work. If you have trouble creating one or need to know a few ways to make the reference check out this link, video #25 in the series is all about creating references. You can see which method will work best for your situation.