Jump to content

Help With A Simple Follower Script


bowman8

Recommended Posts

Hi, I need help setting up a very simple follower script. That just gives you a message when this companion is following you.

First off i'm completely new to scripting and coding in general, and the script which i need help with is just a basic learning script.

What i'm trying to do is when Vigilance, the companion dog at the markarth stables, starts following you after having paid the 500 gold to it's trainer, the script will return a message saying "Vigilance is now following you".
I've set up a pillar activator next to the stables that displays it's follower status when you activate it. With this script

scriptname VigilanceFactionStatus extends ObjectReference

Actor property TrainedDog auto
Faction property CurrentFollowerFaction auto

int Function GetFactionRank(Faction akFaction) native


Event OnActivate(ObjectReference akActionRef)
       if (TrainedDog.GetFactionRank(CurrentFollowerFaction) < 0)
              Debug.Notification("Vigilance CurrentFollowerFaction rank is less than 0")
       ElseIf (TrainedDog.GetFactionRank(CurrentFollowerFaction) == 0)
            Debug.Notification("Vigilance CurrentFollowerFaction rank is 0")
      ElseIf (TrainedDog.GetFactionRank(CurrentFollowerFaction) >= 1)
            Debug.Notification("Vigilance CurrentFollowerFaction rank is 1 or more")
      EndIf
EndEvent



But i want it to display the message the moment it changes it's faction rank to 0 without having to activate anything, i've tried to attach this other script

scriptname CompanionTestScript extends Quest

Actor property TrainedDog auto
Faction property CurrentFollowerFaction auto


Actor Function GetFactionRank(Faction akFaction)
      if (TrainedDog.GetFactionRank(CurrentFollowerFaction) == 0)
            Debug.Notification("Vigilance is now following you")
      EndIf
EndFunction

to a quest but it doesn't do anything.

I've been stuck in this part for like a week now, unable to figure out what's i'm doing wrong, i don't know if the script is the cause, or if it's something CK related, like not having set up the quest properly.
So if anyone could tell me what i'm doing wrong or better yet, give me an example script would be much appreciated.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use