Jump to content

Trying to teleport an NPC to the player with a script.


Undivide

Recommended Posts

I also looked at that mod too when I was figuring out how to do the teleport event. Course I had to figure out how to get the follower to teleport as well....

 

But I just saw something in your script

If (Reiko.GetParentCell() != PlayerRef.GetParentCell() || Reiko.GetParentCell() == PlayerRef.GetParentCell())

That statement is unnecessary because Reiko will ALWAYS be in the same cell as the player or in a different cell.

 

Also you assign the akCaster value to PlayerRef. PlayerRef is defined automatically by the property assignment (provided you fill it). What you could do is use

If akCaster == PlayerRef

just on the outside chance that a NPC might cast your spell.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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