Simple way to persist randomized teleporter exits?

Hello,

I am trying to figure out how to “randomize” teleporter exits from three teleporter entrances but I would like them to persist during each instance of the game such that entrance A can take you to only one of exit A, B or C but once it has chosen an exit, entrance B will never take you to the same exit, nor will entrance C.

For example: Entrance A sends you to random Exit A, B or C. Exit B is randomly chosen. Entrance A will now always take you to Exit B. Entrance B sends you to random Exit A or C (since Exit B is assigned to Entrance A). Exit A is randomly chosen. Entrance B will now always take you to Exit A. Entrance C sends you to random Exit C (since Exit A and Exit B are assigned). Entrance C will now always take you to Exit C.

I have successfully randomized the teleporter exits but I am not sure how to make them persistent. My initial thought is to store the randomized outputs into an array and use the array to tell each teleporter which exit to use. I am just unsure how to network the blueprint to do this. I have attached the randomized exit for entrance A but I am not sure where to go next. If someone has an example of how to wire this blueprint to achieve my results, that would be wonderfully helpful. Thanks for any help you can give!

!

You tried to use booleans? I am a newbie in UE4 and don’t understood the part of random point…you know…the way you scripted in blueprint…but I know if you put a set variable (bool) after the teleport…in the next teleport points (B and C) you can use Branch nodes to compare if the player was teleported to that location…

Sorry, I am pretty new to Blueprints as well and although I see how using Branch booleans applies to a single teleporter selecting and sticking with a single teleporter exit, how do I apply it to three teleporters choosing from three exit locations and always using that exit location until a new game is launched?

It seems like what I need is something that takes my three teleporter exit locations, randomly sorts them, and assigns one of the three outputted exit locations to each of the three SetActorLocation destinations. I’m also not sure if that location will persist through multiple teleporter uses or if it will randomize the location every time you use one of the teleporters. I want the exit locations to persist after it has randomly sorted them and assigned them to the SetActorLocation events.

Your answer helped after all but to make it persist I ended up setting the boolean variables randomly to either true or false on level start and when i use the teleporters, it checks on those booleans to decide which exit to use. Since the booleans never change after level start, the teleporter exits persist. As soon as I start the game again, it randomizes the boolean variables and I end up with randomized teleporter exits!

Thanks for the suggestion Sand, it ended up leading me down the correct road! :slight_smile: