Jump to content

Teleport Script question


ShadowTek

Recommended Posts

Hello, Im working on a world space, and the door that connects to it will not bring along followers. We have tried everything and the entire navmesh has been redone by hand. days have been spent, and it simply will not work (trust me on this lol)

 

Anyway, thats not why Im here, as we are well past that, I have a simple fast travel script on the doors as even normal move.to teleport wont take followers.

 

Scriptname LBCityGate02 extends ObjectReference  

ObjectReference Property TeleportMarker auto

Event OnActivate(ObjectReference akActionRef)
Game.FastTravel(TeleportMarker)

EndEvent

 

There are two things I am wondering, the doors now work and all followers go through, but if a NPC uses the door and the Player is near by.. he teleports too, I tried to stop it, but when I do, followers wont teleport again, Im just wondering if theres a easy way to add a check so that the player and his followers wont teleport if a npc uses the door, without having to stop NPCs using it and won't break the followers teleporting with the player as fast travels seems to be the only command that will work.

 

The second thing is when you use the door (ie open it) and teleport, the door stays open until the next time you use it, I was wondering how to make the door automatically return to the closed position after it is used.

 

Thanks for any help in this matter :)

Edited by ShadowTek
Link to comment
Share on other sites

Maybe you could use a combination of FastTravel and MoveTo. This isn't tested in game, but it compiles correctly:

 

 

Scriptname LBCityGate02 extends ObjectReference  

ObjectReference Property TeleportMarker auto

Event OnActivate(ObjectReference akActionRef)
if akActionRef == Game.GetPlayer()
	Game.FastTravel(TeleportMarker)
	SetOpen(false)
else
	Actor npc = akActionRef as Actor
	npc.MoveTo(TeleportMarker)
	SetOpen(false)
endif
EndEvent

Link to comment
Share on other sites

Maybe you could use a combination of FastTravel and MoveTo. This isn't tested in game, but it compiles correctly:

 

 

Scriptname LBCityGate02 extends ObjectReference  

ObjectReference Property TeleportMarker auto

Event OnActivate(ObjectReference akActionRef)
if akActionRef == Game.GetPlayer()
	Game.FastTravel(TeleportMarker)
	SetOpen(false)
else
	Actor npc = akActionRef as Actor
	npc.MoveTo(TeleportMarker)
	SetOpen(false)
endif
EndEvent

 

Thanks for the reply, I'll try it out now :)

 

 

EDIT: YES! You are brilliant! Works perfectly, Thank you very much! Kudos for you :)

Edited by ShadowTek
Link to comment
Share on other sites

  • Recently Browsing   0 members

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