Jump to content

[Skyrim SE] Script that does not allow a follower to use fast travel to Interiors


Recommended Posts

Hi

I created a horse that behaves like a follower in the game, but now I have a problem.
I also created a fortress, which being really big, has magic stones that allow fast travel from one place to another... What I would like to do is, when I teleport from one place to another in the fortress, that the horse does not follow me once the fast travel has been performed (obviously it appears close to me because in the game mechanism it is recognized as a follower).
So I would like to create a script to put on the horse that does 2 things:
- recognizes that a place is an interior
- (and therefore) does not allow the horse to use fast travel together with the player
Does anyone have any ideas on how to make the script and with what commands?

I saw this but I did not understand how it works:
MyHouseMarkerProperty.EnableFastTravel(false)

Could MyHouseMarkerProperty be an XMarker to put inside my house? Because if that were the case, I would just need to insert a script into the horse with this string, making it recognize the XMarker and not allowing the horse to use fast travel in the area where it is positioned . . .

Does it work like this or differently?

I thank in advance whoever answers

Link to comment
Share on other sites

what wrong with a stable?

; Enable fast travel
Game.EnableFastTravel()

; Disable fast travel
Game.EnableFastTravel(false)

there you go, see where you when wrong

EDIT: if you are not sure what the code does, I would recommend looking it up

https://ck.uesp.net/wiki/Category:Papyrus#:~:text=Pages in category "Papyrus

bookmark that page, and in this case

https://ck.uesp.net/wiki/EnableFastTravel_-_Game

 

Link to comment
Share on other sites

The issue here is not fast travel per se.  It is about how the follow AI procedure works.  If the follow target is not in the same worldspace or too far from the follower, the AI package makes it teleport near the target.

I do not know of any way to affect this behavior.  My suggestion would be to change how the AI package is setup.

Unfortunately you cannot do it by adding conditions to the AI package itself.  The conditions will not be checked fast enough to prevent the builtin teleport.

One possibility would be to have the horse follow a marker instead of the player, and have the marker periodically move to where the player is.  Using a script on the marker, you can test whatever conditions you need.  You'll have to work out exactly where you want the marker to go... "targetMarker.moveto( Game.getPlayer())" for the most part, but where do you want it to go otherwise? and under what conditions exactly?

Your first challenge will be making these conditions and destinations explicit.

Link to comment
Share on other sites

3 hours ago, PeterMartyr said:

what wrong with a stable?

; Enable fast travel
Game.EnableFastTravel()

; Disable fast travel
Game.EnableFastTravel(false)

there you go, see where you when wrong

EDIT: if you are not sure what the code does, I would recommend looking it up

https://ck.uesp.net/wiki/Category:Papyrus#:~:text=Pages in category "Papyrus

bookmark that page, and in this case

https://ck.uesp.net/wiki/EnableFastTravel_-_Game

 

Thanks for the answer

I know exactly how to enable and disable the fast travel, i wrote that i crated magic stones that allow fast travel from one place to another, obviously between different interiors inside the fortress.

The problem is not how to enable or disable the fast travel, but how to do it for the horse that acts like a follower in my case. I don't want the horse to appear next to me when I fast travel inside my fortress once I reach my destination.

About the stable . . . it's all in a new worldspace, and unfortunately stables doesn't work in new worldspaces

Link to comment
Share on other sites

57 minutes ago, xkkmEl said:

The issue here is not fast travel per se.  It is about how the follow AI procedure works.  If the follow target is not in the same worldspace or too far from the follower, the AI package makes it teleport near the target.

I do not know of any way to affect this behavior.  My suggestion would be to change how the AI package is setup.

Unfortunately you cannot do it by adding conditions to the AI package itself.  The conditions will not be checked fast enough to prevent the builtin teleport.

One possibility would be to have the horse follow a marker instead of the player, and have the marker periodically move to where the player is.  Using a script on the marker, you can test whatever conditions you need.  You'll have to work out exactly where you want the marker to go... "targetMarker.moveto( Game.getPlayer())" for the most part, but where do you want it to go otherwise? and under what conditions exactly?

Your first challenge will be making these conditions and destinations explicit.

Thanks for the answer

I can place specific XMarkers where i want inside the fortress but i don't understand what for...

Your proposal, if I understand correctly, is to make it so that when I activate one of the magic stones to use fast travel inside the fortress, the horse is teleported to another place at that moment (which could be for example a stable outside the fortress)...
It would be worth trying as an idea...

Link to comment
Share on other sites

1 hour ago, Tiziano74 said:

Your proposal, if I understand correctly, is to make it so that when I activate one of the magic stones to use fast travel inside the fortress, the horse is teleported to another place at that moment (which could be for example a stable outside the fortress)...
It would be worth trying as an idea...

I was actually thinking that your horse would follow the marker all the time, instead of you (or whoever else the horse normally follows).  You then have the choice of making the marker follow you or not according to circumstances.  You just need to move the marker around using a script (say once a second).

What you suggested would also work, but only for the fast travels you initiate with your stones.  The horse would still follow you through any load doors or when fast traveling from the map.

Link to comment
Share on other sites

Consider skipping actual fast travel in the home.  Instead, use MoveTo to move the player from one location to another when your magic stones are activated.  You can then check for any followers and what type of follower they are and use MoveTo on only the appropriate ones.  Or just leave all followers at the entrance.

The only real reason to use the fast travel mechanic is if you are concerned about maintaining the passage of game time when travelling.

 

  • Like 1
Link to comment
Share on other sites

On 7/28/2024 at 8:09 PM, xkkmEl said:

The horse would still follow you through any load doors or when fast traveling from the map.

This Horse that i created can't open doors, so it can't follow me inside interriors or load doors, btw it can travel with me in the map as a follower in fast traver, and it's exactly what i wanted.

Link to comment
Share on other sites

19 hours ago, IsharaMeradin said:

Consider skipping actual fast travel in the home.  Instead, use MoveTo to move the player from one location to another when your magic stones are activated.  You can then check for any followers and what type of follower they are and use MoveTo on only the appropriate ones.  Or just leave all followers at the entrance.

The only real reason to use the fast travel mechanic is if you are concerned about maintaining the passage of game time when travelling.

 

Thanks for the answer

How can i check for any followers and what type of follower?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...