SetStage to dismiss a follower-can it be done?

Post » Fri Aug 16, 2013 9:11 pm

In my new world mod when the player starts the mod he/she is teleported to the new world. Followers can't follow because they can't teleport and I don't want them to follow anyway. How do I get the follower to say to the player "I'll be off then" words to that effect and the follower returns home. Ideally it would be at the start of the mod's main quest in a stage just before the player decided to teleport to the new world.

Thanks.

EDIT: I just thought the amount of followers possible would require a voice file for each so scratch the dialogue and I'd like to go with a debug.messagebox "Your follower leaves your service" or similar and follower goes home. Help please.

User avatar
He got the
 
Posts: 3399
Joined: Sat Nov 17, 2007 12:19 pm

Post » Fri Aug 16, 2013 10:19 am

Hi,

I think you can use the vanilla Follower Quest to dismiss the current follower. Add a property of type Quest to your main quest in the designated stage and fill it with the Follower Quest (sorry don't have the CK at hand at the Moment, so I don't know the exact Quest ID, but I think it's called DialogueFollower ?). Then in the quest fragment typecast it to the DialogueFollowerScript and call it's DismissFollower function.

Should look like this:

;dismiss current follower when this stage is setDialogueFollowerScript aScript = FollowerQuest as DialogueFollowerScriptif aScript.pFollowerAlias && aScript.pFollowerAlias.GetActorRef().IsDead() == False	; we have a follower and he/she's not dead	aScript.DismissFollower()	; either you can show a message	; myMessage.Show()	; or display a debug notification	; debug.Notification("Follower dismissed")endif	

-docblacky

User avatar
Ladymorphine
 
Posts: 3441
Joined: Wed Nov 08, 2006 2:22 pm

Post » Fri Aug 16, 2013 1:54 pm

For vanilla followers and mod added ones that use the vanilla framework...

First of all you'll need to add a Quest property called "DialogueFollower" (if you name it that, it should auto-fill).

Then the code for your fragment would be:

(DialogueFollower as DialogueFollowerScript).DismissFollower()
But if only life were that simple! The problem with the above is that not all mods use the vanilla framework (complicated followers such as villa have their own and follower controller mods either have their own or change the vanilla). To account for these you'll have to get creative

I answered this question a few weeks ago while I was on holiday. I'll try and dig up the post, but I'll warn you now, my solution requires SKSE cell-walking functions. It's up to you if you want to make your mod dependent on SKSE

EDIT: Ninja'd :ninja:

EDIT2: Turns out the thread where I posted that solution was one you started already for the same subject:

http://www.gamesas.com/topic/1467377-checking-for-follower-and-moving-it/?

- Hypno
User avatar
Genevieve
 
Posts: 3424
Joined: Sun Aug 13, 2006 4:22 pm


Return to V - Skyrim