How do I script a "Set home to here" function?

Post » Wed Jun 26, 2013 5:11 am

I'd like to be able to have players tell my NPC to "set home to here" so they can use custom houses with her.

Anyone know how I'd accomplish this? I've searched and searched and haven't found any tutorials or anything else.

Help much appreciated!

User avatar
Tom Flanagan
 
Posts: 3522
Joined: Sat Jul 21, 2007 1:51 am

Post » Tue Jun 25, 2013 9:12 pm

When you dismiss a follower, they are taken out of the follower alias which in turn forces them to use whatever package is in their ActorBase's package stack.

1. Make a new sandbox package and place an xmarker near where they are first found by the player. Use this xmarker as the target for the sandbox package.

2. Now duplicate the xmarker activator base object to make your own version and place the following script on it:

Scriptname MarkerMoveScript extends ObjectReferenceObjectReference Property SandboxMarker  AutoEvent OnInnit()   SandboxMarker.MoveTo(self)   DeleteWhenAble()EndEvent
(don't forget to fill the "SandboxMarker" property with the target marker from the last step)

3. Make a new Explosion (duplicate one that uses the invisible effect model) and under "Placed Object" select your new scripted xmarker

4. Make a new Projectile (again, duplicate one that uses the invisible model) and then set the Explosion to your new one from the last step

5. Now just make a spell (you might want to make it a "Lesser Power") that uses the projectile from the last step


What you should be left with is a spell that when cast, places the scripted xmarker wherever you were aiming. This xmarker then moves the SandboxMarker to this location then deletes itself. Now when you dismiss your follower, they will default to the sandbox package and sandbox wherever the marker is in the world

- Hypno
User avatar
Alan Cutler
 
Posts: 3163
Joined: Sun Jul 01, 2007 9:59 am


Return to V - Skyrim