Jump to content

Follower scripting help


Recommended Posts

Hello

I am trying to make a respawnable hireling follower in Skyrim, my mod is called Thieves Guild Recruit.

Problem is when she dies, and then respawns, the conversation topic "Considered yourself hired" , does not show up again.  But that is what I am trying to make happen.  She can be hired again.

I believe the problem lies with the Factions but I maybe wrong.  So my thought was to put an onDeath script on her.  To remove her from those factions.

I completely forgot the CK from not using it for 5 years.  Well mostly.  Anyways I wrote this script on her, wont compile, does not say why.

----------------------

Scriptname aaMF3_onDeathRemoveFromFaction extends ObjectReference

Event OnDeath(Actor akKiller)
  if (akKiller == Game.GetPlayer())
    Debug.Trace("We were killed by the player!")
  endIf
    
    (GetActorBase().RemoveFromFaction(CurrentFollowerFaction)
    Debug.Trace("Faction1 Removed")

    (GetActorBase().RemoveFromFaction(CurrentHireling)
    Debug.Trace("Faction2 Removed")

endEvent

---------------------------

 

Could use some help here.  Very much appreciated, thanks!

Link to comment
Share on other sites

This clearly won't compile:

(GetActorBase().RemoveFromFaction(CurrentFollowerFaction)

Parenthesis don't balance, and ActorBase.RemoveFromFaction does not exist.

You mean:

(Self as Actor).RemoveFromFaction(CurrentFollowerFaction)

Or better yet:

Scriptname aaMF3_onDeathRemoveFromFaction extends Actor

Event OnDeath(Actor akKiller)
	...
	RemoveFromFaction(CurrentFollowerFaction)
	...
endfunction

 

Edited by xkkmEl
Link to comment
Share on other sites

  • Recently Browsing   0 members

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