Zorkaz Posted April 24, 2020 Share Posted April 24, 2020 I just wanted a topic on teleports, since there are many ways and all have their pros and cons So out of my mind I know about 3 ways to teleport the player (and or objects) 1. The basic door teleportPro: Easy to useCon: Marker can't be interacted with. Requires updating the navmesh 2. Game.FastTravel(TeleportLocation)Pro: Works great for NPCsCon:Uses the fast-travel system so time will pass (And the player get thirsty)Also it's not possible while the player is over-encumbered 3. MovetoPro: Doesn't use the fast-travel system and works great for objects as well as the PlayerRefCon: Won't work on NPCs at least not with basic scripts Are there any other good teleport methods and or is my info wrong? Link to comment Share on other sites More sharing options...
Reneer Posted April 24, 2020 Share Posted April 24, 2020 There is no extra scripting required for moving NPCs beyond the normal MoveTo call. Link to comment Share on other sites More sharing options...
Zorkaz Posted April 24, 2020 Author Share Posted April 24, 2020 I should have been more precise. I meant NPCs interacting with script-doors, so they can use them. But maybe it' s just the way I set up the script Link to comment Share on other sites More sharing options...
pra Posted April 28, 2020 Share Posted April 28, 2020 Door Teleportation is static. While you could move the door via script, there is no way to relocate the marker.The navmesh even less so.FastTravel will also fail if the player is overencumbered. You have to put some spell on them which sets carry capacity to 9000 or so.MoveTo won't teleport player followers. They still somehow follow sometimes, but not always.The safe way is to loop through them and teleport them separately. Potentially also check distance to player to see if they followed already on their own.NPCs won't use any kind of scripted teleportation on their own. They only teleport if the navmesh allows them to. Link to comment Share on other sites More sharing options...
SKKmods Posted April 28, 2020 Share Posted April 28, 2020 Whilst companion and follower AI packages will automatically move them to keep within a radius of the player, e.g. if they get stuck on rocks and such, in survival a companion moves to homelocation if they happen to be bleeding out. For a full-fat solution after a player MoveTo; Actor[] PlayerFollowers = Game.GetPlayerFollowers() If (PlayerFollowers.Length > 0) Int iIndex = 0 While (iIndex < PlayerFollowers.Length) PlayerFollowers[iIndex].MoveTo(pPlayerREF) iIndex +=1 EndWhile EndIf Link to comment Share on other sites More sharing options...
Zorkaz Posted April 28, 2020 Author Share Posted April 28, 2020 Here's a good topic about avoiding navmesh finalizing when making a door that works for NPCs too: https://forums.nexusmods.com/index.php?/topic/4862395-alternative-to-finalizing-exterior-navmeshes/ Link to comment Share on other sites More sharing options...
pra Posted April 29, 2020 Share Posted April 29, 2020 Here's a good topic about avoiding navmesh finalizing when making a door that works for NPCs too: https://forums.nexusmods.com/index.php?/topic/4862395-alternative-to-finalizing-exterior-navmeshes/ Hm, so he's finalizing the navmesh in the interior, but not the exterior. And then uses your method #2 to move the player. I imagine this would work for NPCs moving from the inside to the outside, but does the other way round work? SKK's script should work, though I'd moveTo the followers to the teleportLocation marker, not the player. It will be the same most of the times, but if you have a whole lot of followers and/or lots of script lag, they might keep appearing around you after you moved away from the door. Also, before actually moveTo'ing the follower, I'd check if they are nearby already. Link to comment Share on other sites More sharing options...
Recommended Posts