I am trying to get all actors of class Door and trying to identify which door the player when through using tags. The problem is I don’t know how to identify which door the player went through. Is there a node or anything I can use in order to do this?
There's a lot things that you can do to solve that. I will go with a simple to implement one:
-
Make a variable on your GameMode that holds the last door visited. (Actor LastDoorVisited)
-
On your door blueprint, add a BoxCollision component and add a OnComponentBeginOverlap event to it.
-
Following that event: get the GameMode reference, cast it to your GameMode class and set your LastDoorVisited using the reference to the current door (using Self).
-
Inside your AI, get the GameMode reference, cast it to your GameMode class and just get your LastDoorVisited reference.
What do you mean by GameMode? I don’t think I have one in my project