Best way to check hit result for switches

If you follow something like what I suggest, you won’t need to use strings at all.

Basically, just imagine each room in your level having a custom blueprint actor in it — or more than one, if need be. (These could be the spheres that you’re using right now, just blueprinted to be a specific blueprint class for this purpose.)

You would place these custom blueprint actors in your level like you might any other actor — just drag 'em into your level, and move 'em into place. In your case, you’ll probably put them near the doorway to each room, or wherever you want the player to see and interact with them to initiate a teleport.

If your tracing blueprint script happens to hit one of these custom blueprint actors — which you will easily know by using the Cast node — then you will already have almost all the information you need.

You won’t need to look over a collection of strings to find the right destination — the blueprint actor that was hit by the line trace will contain all the necessary info! (Such as teleport destination location, which can be stored in a public vector variable that is adjustable for every such blueprint actor in your level.)

If I’m still not making sense, just let me know, and I’ll post a screenshot example of what I mean as soon as I can. But, once I get my idea across, I think you’ll find that it greatly simplifies what you’re trying to do!