Hi! I’m still very new to all of this so go easy on me please! I looked around and couldn’t find anything like my issue (or I’m bad at searches) so hopefully someone has an answer for me.
So I’m trying to have the player teleport into a house moving from one level to another and then teleporting back again upon interacting with the door. I have it working going one way, but when I teleport the player back to the original map (outdoors) it sends them back to the starting location rather than where I’m telling it to teleport the player upon coming back out.
I’m using a game instance boolean to determine if the player is inside or outside the house at the time. Basically it is set up to teleport the player into the house, set the boolean to true, then set it to false upon leaving the house. Once back on the outdoor map it immediately checks if the boolean is true or false, if it’s false (as it should be set to when leaving the house) then it teleports the player to the front of the house, otherwise leaving the player at the default position.
However it is not doing this. It’s always sending the player to the default position and never teleporting the player in front of the house. I even have it set up so I can check if the boolean is set to true or false in each level and that’s working correctly!
Here’s how I have it all set up (Note, I have the boolean set to true by default so that it doesn’t set you in front of the door upon starting the game):
Thanks so much for the response!
I tried the second suggestion, no luck sadly (I tried various approaches with this as well). As for the first, I’m still pretty new so I’m not quite sure how to do that… either way still no luck in fixing it…
edit
I tried removing the Player Start position and using the teleport as default, so when you start the stage it teleports you to the starting location (boolean set to true), when you exit the building it teleports you to the front of the house (boolean set to false).
But no matter what it only uses the teleport to the starting location, even if I confirm the boolean was changed to false.
Begin overlap in both those codes are in two different maps, so it’s only being activated once per map anyway as far as I’m aware? The first of the three codes is in the level blueprint of my ‘Start’ map, sending me to my ‘Houses’ map. The second of three codes is in the level blueprint of my ‘Houses’ map sending me to my ‘Start’ map.
The third is in the level blueprint of the ‘Start’ map.
So onactorbeginoverlap cannot be used more than once in the entire game even if it’s in entirely different levels? I’ve never had an issue in the past with multiple uses of it so long as they’re in different levels/blueprints. Can you link me to one of these tutorials so I can see what I might be doing wrong then?
edit
To add to my confusion, both of those codes with onactorbeginoverlap are working fine. It’s the teleporting that isn’t working in the third code.
Okay I’m totally baffled. I removed the redundant teleport on ‘true’ (as that’s just going to player start location anyway) and it wasn’t working still. Played around with it but returned it back to the original code sans the redundant teleport and suddenly the whole code is working despite having not been working before, nothing changed.
I have no idea what I did to magically make it work but it’s working now.
Thanks for all the help guys!