Difference between revisions of "FastTravel - Game"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Cdcooley
(exteriors (at least some of them) do work)
imported>DavidJCobb
(→‎Notes: ragdolling is broke)
Line 24: Line 24:
== Notes ==
== Notes ==
*Scripted fast-travel does not save the player's game.
*Scripted fast-travel does not save the player's game.
*In some cases, a loading screen will play but the player will stay on the same spot.
*In some cases, a loading screen will play but the player will stay on the same spot.
*This function doesn't always work as intended. An alternative is using [[MoveTo - ObjectReference]]. Due note however that MoveTo does not advance time.
*This function doesn't always work as intended. An alternative is using [[MoveTo - ObjectReference]]. Due note however that MoveTo does not advance time.
* Neither FastTravel nor MoveTo will work properly if the player is currently ragdolling. If the map marker is in another worldspace, the player will go to their current coordinates in that worldspace; if the marker is in the same worldspace, the player's physics will glitch and carry them toward the marker until they stop ragdolling. To avoid these problems, you should call [ForceRemoveRagdollFromWorld - ObjectReference]] on the player before trying to fast-travel.


== See Also ==
== See Also ==
*[[Game Script]]
*[[Game Script]]

Revision as of 18:14, 6 August 2018

Member of: Game Script

Fast-travels the player to the specified ObjectReference's location.

Syntax

Function FastTravel(ObjectReference akDestination) native global

Parameters

  • akDestination: The object to fast travel to.

Return Value

None.

Examples

; Fast-travel home
Game.FastTravel(HomeMarker)

Notes

  • Scripted fast-travel does not save the player's game.
  • In some cases, a loading screen will play but the player will stay on the same spot.
  • This function doesn't always work as intended. An alternative is using MoveTo - ObjectReference. Due note however that MoveTo does not advance time.
  • Neither FastTravel nor MoveTo will work properly if the player is currently ragdolling. If the map marker is in another worldspace, the player will go to their current coordinates in that worldspace; if the marker is in the same worldspace, the player's physics will glitch and carry them toward the marker until they stop ragdolling. To avoid these problems, you should call [ForceRemoveRagdollFromWorld - ObjectReference]] on the player before trying to fast-travel.

See Also