Creating a ForceGreet for an active follower

Post » Sat Nov 08, 2014 9:43 am

I have a general idea for creating a ForceGreet (with mixed results unfortunately) but I am curious about the approach of creating a ForceGreet with an active follower (meaning someone following me). I am hoping (for the sake of a dynamic approach) of using the quest alias to do such a process. My questions are (and I apologize for the noobiess of these questions):

-What exactly is the process of doing a typical forcegreet for a follower (for example, I am trying to get my NPC to talk to the player before entering the abandoned house in the House of Horrors quest, essentially telling the player that she has a bad feeling about this house). I am assuming that you can do this based on my trial and error testing (Rough Sketch):

  • Create your Dialogues in Normal (assuming I used an alias already)
  • Set-up a scene that will create a trigger using the 'defaultStartSceneTrigger' script.
  • Place the trigger where you want it to be in the world (mine will be right outside the door of the abandonded house).
  • Create your AI Package for your ForceGreet.
  • Create a Scene and place that package in that scene.
  • In your trigger box, edit the properties in the defaultStartSceneTrigger script so that it reflects AIPackage (in particular, the SceneToStart script will connect to your scene.
  • Have the follower walk to the scene with you and Forcegreet will trigger.

This method seems to be working for me, but I am curious if this is a valid approach to it? Meaning is building ForceGreets through scenes a valid approach?

-I know that there are some triggers that use defaultStartSceneTrigger already so am I safe in using that?

-Is there anything that i am missing?

I am hoping someone will give me a better idea to do forcegreets the right way.

User avatar
Amy Cooper
 
Posts: 3400
Joined: Thu Feb 01, 2007 2:38 am

Post » Sat Nov 08, 2014 6:37 am

I recommend a different and simpler approach. Create your trigger where you want the forcegreet to begin, and then, when your follower enters the trigger, set a property to 1. Add your forcegreet package to the follower, on top of all other packages, with the condition YourProperty == 1. In the ending dialogue piece of the forcegreet, set YourProperty to 2. It's much simpler and has no need of scenes.

User avatar
Bek Rideout
 
Posts: 3401
Joined: Fri Mar 02, 2007 7:00 pm

Post » Sat Nov 08, 2014 12:13 pm

I hate to admit it, but for some reason my brain isn't registering what you are trying to get at (probably due to lack of sleep). So, I really do apologize for the following stupid questions.

I am assuming you want me to either:

  • First create a brand NEW activator instead of using defaultStartSceneTrigger. Inside that activator, I am going to create a script inside that activator that allows the said property.

or

  • Within the Quest Tab that I am keeping my dialogue, create a quest script in there that will contain a property (defaulted to 1 or 0).

Then use that value in for the AI Package.

I don't know why I am blanking out on this. I created the trigger box, I have my AI Package set up to use option 2 with a VMQuestVariable = 1 and the end of the forcegreet will set it to 2 (with DA10 == 10.00 as the getstage so it will only occur when DA10 begins), killing any future trigger. The AI Package is linked to the first branch of the topic but I seriously I feel like I missing something. I don't need to add a script or anything like that to the trigger?

User avatar
Dean Brown
 
Posts: 3472
Joined: Fri Aug 31, 2007 10:17 pm

Post » Sat Nov 08, 2014 4:54 pm

You want to add a new script to your activator which sets a Conditional variable on your quest script (I'll call it MyProperty), when your follower enters (OnTriggerEnter) that trigger. It sets the variable to 1. On your forcegreet package, under Conditions, have the condition GetVMQuestVariable YourQuest MyProperty == 1. Then, on the ending dialogue fragment for your forcegreet, set MyProperty to 2 so the package will not be triggered again.

User avatar
Amie Mccubbing
 
Posts: 3497
Joined: Thu Aug 31, 2006 11:33 pm

Post » Sat Nov 08, 2014 2:55 pm

So if I am understanding you correctly. Here is my code for the quest script:

Scriptname SDETestScript extends Quest  Conditional Int Property TestTrigger = 0 Auto  Conditional

Here is the end of the forcegreet script:

(GetOwningQuest() as SDETestScript).TestTrigger = 2

Here is my code in the activator:

Scriptname SDETestTriggerScript extends ObjectReferenceInt Property TestTriggerA = 0 Auto Quest Property OwnerQuest autoobjectReference property triggerActor autoEVENT onTriggerEnter(objectReference triggerRef)     if (triggerRef as actor == triggerActor && TestTriggerA == 0)          TestTriggerA += 1          (OwnerQuest as SDETestScript).TestTrigger +=1endifendEvent
User avatar
brian adkins
 
Posts: 3452
Joined: Mon Oct 01, 2007 8:51 am

Post » Sat Nov 08, 2014 10:05 am

The TestTrigger property is not necessary if you've already got the property in your quest. It could be this:

Scriptname SDETestTriggerScript extends ObjectReferenceQuest Property OwnerQuest autoActor property triggerActor autoEVENT onTriggerEnter(objectReference triggerRef)     if (triggerRef as actor == triggerActor && TestTriggerA == 0)          TestTriggerA = 1          (OwnerQuest as SDETestScript).TestTrigger +=1     endifendEvent
User avatar
Lexy Corpsey
 
Posts: 3448
Joined: Tue Jun 27, 2006 12:39 am

Post » Sat Nov 08, 2014 3:38 pm

That one was probably my bad because I am pretty exhausted and frazzled (not the best situation when trying to learn a new aspect of the Creation Kit, lol).

I am assuming you meant the TestTriggerA variable because when I tried the code you posted, it pretty much errored out. I declared TestTriggerA in the beginning to control the script (I could probably just use a DoOnce script that the CK has - if it has one).

But as far as far as the scripting goes, are those three scripts what you are talking about?

User avatar
^_^
 
Posts: 3394
Joined: Thu May 31, 2007 12:01 am

Post » Sat Nov 08, 2014 2:19 am

Oh, yeah, oops. For some reason I thought TestTrigger was the same as TestTriggerA. I seem to be alittle tired too.

Yeah, that's right.

User avatar
Rudi Carter
 
Posts: 3365
Joined: Fri Sep 01, 2006 11:09 pm

Post » Sat Nov 08, 2014 3:59 am

So here is the entire process (that way if there are any mistakes it can easily be found out):

  • Created a new Quest Topic (SDETestFG) with an alias
  • Created a script within that quest:
Scriptname SDETestScript extends Quest ConditionalInt Property TestTrigger = 0 Auto Conditional
  • Create a dialogue branch in the normal with my starting topic being SDETestFGBranchTopic. The conditions for that topic are
GetStage Quest: DA10 == 1.00 ANDGetVMQuestVariable Quest: SDETestFG, ::TestTrigger_var == 1.00 AND
  • At the end of the forcegreet dialogue, I use this fragment:
(GetOwningQuest() as SDETestScript).TestTrigger = 1
  • We create our AI Package (SDEFG) using the above conditions for the AI package to trigger:
GetStage Quest: DA10 == 1.00 ANDGetVMQuestVariable Quest: SDETestFG, ::TestTrigger_var == 1.00 AND
  • I also set the template to forcegreet, have the topic link to our branch and set out NPC wait and Trigger Location to our playerref.
  • Next, we create our trigger (SDETrigger) and add the following script:
Scriptname SDETestTrggerScript extends ObjectReferenceInt Property TestTriggerA = 0 Auto Quest Property OwnerQuest autoobjectReference property triggerActor autoEVENT onTriggerEnter(objectReference triggerRef)     if (triggerRef as actor == triggerActor && TestTriggerA == 0)          TestTriggerA += 1          (OwnerQuest as SDETestScript).TestTrigger +=1endifendEvent
  • Now we go to our render window and add a trigger box in Markarth, near the abandoned house.
  • We add the SDETrigger activator into our box and that's it? Feels like something is missing. I tried testing everything out and the forcegreet doesn't trigger.
User avatar
!beef
 
Posts: 3497
Joined: Wed Aug 16, 2006 4:41 pm

Post » Sat Nov 08, 2014 10:28 am

It should be TestTrigger = 2 at the end of your dialogue fragment. Make sure you've generated an SEQ file (if it's start game enabled) and that the radius of your package is large enough.

User avatar
naana
 
Posts: 3362
Joined: Fri Dec 08, 2006 2:00 pm

Post » Sat Nov 08, 2014 3:13 pm

Yeah, I fixed that fragment and I increased the radius for all three to 1000 and nothing still triggers. I always do the SEQ file. But pretty much it is not working. :/

User avatar
Elizabeth Falvey
 
Posts: 3347
Joined: Fri Oct 26, 2007 1:37 am

Post » Sat Nov 08, 2014 7:13 am


I'm not sure why it wouldn't. It always has in the past for me. Are you sure your package is on your follower alias above all other packages?
User avatar
Betsy Humpledink
 
Posts: 3443
Joined: Wed Jun 28, 2006 11:56 am


Return to V - Skyrim