![]()
|
|
A good catch !
Ever wondered why follower teleports often don't work (e.g. when using a load elevator) ? This is probably why.
I'm posting the fixed function (on FollowersScript) below. The comment will explain the mistake:
Ever wondered why follower teleports often don't work (e.g. when using a load elevator) ? This is probably why.
I'm posting the fixed function (on FollowersScript) below. The comment will explain the mistake:
Function TeleportActor(Actor ActorToTeleport, ObjectReference TeleportDestinationRef, bool ShouldPlayTeleportInEffect, bool ShouldPlayTeleportOutEffect) debug.trace(self + "TeleportActor() ActorToTeleport: " + ActorToTeleport + ", TeleportDestinationRef: " + TeleportDestinationRef) TeleportActorScript TeleportActor = ActorToTeleport as TeleportActorScript if ShouldPlayTeleportOutEffect if TeleportActor TeleportActor.TeleportIn() else game.Warning("FollowerScript: TeleportFollowers() actor doesn't have TeleportActorScript attached, can't play fx! " + ActorToTeleport) endif endif utility.wait(5) debug.trace(self + "TeleportActor() calling MoveTo()" + TeleportDestinationRef) ;TeleportActor.MoveTo(TeleportDestinationRef) ;UFO4P 2.1.0 Bug #26179: replaced the previous line with the following line: ;Otherwise, this call will fail on all actors that do not have a TeleportActorScript attached (e.g. Dogmeat), but that script is only used for playing the teleport FX and ;has nothing to do with whether the actor can be moved or not. ActorToTeleport.MoveTo (TeleportDestinationRef) debug.trace(self + "TeleportActor() done with moveto" ) if ShouldPlayTeleportInEffect if TeleportActor TeleportActor.TeleportIn() else game.Warning("FollowerScript: TeleportFollowers() actor doesn't have TeleportActorScript attached, can't play fx! " + ActorToTeleport) endif endif debug.trace(self + "TeleportActor() done" ) EndFunction
Comment #1 Oct 16, 2019 5:14 am
Edited by Sclerocephalus on Oct 16, 2019 5:20 am
Showing Comments 1 - 1 of 1