Here’s the scenario:
I’m building a level in which the player character can walk through a portal that teleports them back to the level’s starting location. I’ve done this by putting a trigger volume in a doorway, linking it to an OnActorBeginOverlap node that feeds into a Teleport node with the player character set as the target and a blank actor at the level’s starting point set as the destination location.
It works fine and all when the player character walks through it, but also present in the level are several dozen AI NPC’s that are also slowly making their way toward the portal. For the sake of the game’s story, they also need to be able to enter the portal. I’d like to rig the level so that whenever an NPC walks through the portal, it is teleported to its own starting location (not the player’s starting location). Under the current blueprint, however, whenever an NPC walks into the portal, it just teleports the **player **character back to the starting point, no matter where on the map the player character is when the NPC enters the portal.
Is there a way to rig the teleporter such that whatever actor enters the teleporter’s trigger volume, be it the player character or an AI NPC, only the actor entering the trigger volume is teleported?
One idea that comes to mind is to, within the portal, create a trigger volume for each of the NPC’s that is specific to that NPC, and to physically place the NPC’s trigger volumes in front of the player character’s trigger volume, so that any NPC entering the portal will be teleported away before they can enter the player character’s trigger volume. But that just seems over-elaborate. Anyone have any suggestions?
Thanks in advance.