Jump to content

[LE] Help with scene trigger


ChewNTobacca

Recommended Posts

Let's start by saying this is my first attempt at custom dialogue and scenes. I thought I would start simple with a one-line greeting upon entry to an inn. This is my own custom inn.

I've got the quest, aliases, and scene established (to the best of my knowledge) as well as the trigger with a "defaultStartSceneTrigScript" set up (again, to the best of my knowledge).

 

I've done some looking and can't seem to find a real solution. Would anyone mind setting me straight on this one?

 

Thanks,

Chew

Link to comment
Share on other sites

Thanks for the info. I've read up on both the written tutorials already. The videos helped to clarify some of the fuzzy areas. It looks to me like I'm going to have to learn the script language to accomplish a simple task; seems like an awful lot of effort for one line of dialogue (I've not used papyrus for anything). Is there an easy(er) way to use a trigger to activate the one line of speech?
Link to comment
Share on other sites

Where, when and how do you want this to happen?.

- How is saying this line? a follower that's following you?

- An npc that's already in that cell ?

- The bartender sais it when you approach him?

- Does this line needs to be said at a specific location of the cell? or/and at a specific time or/and at a specific npc?

- Does the line needs to be said at a random location in the cell and time, like when its IDLE?


As you may have understand by now, some things, although not necessary complicated, are not that simple like pressing a button or drag and drop or creating a follower.

Edited by maxarturo
Link to comment
Share on other sites

Here's a little more detail on the plugin. I've created a custom inn with a custom innkeeper (an Argonian male) who works behind the counter and has merchant factions and the rent room script functioning normally. It is traditional inn layout such as Four Shields Tavern or Sleeping Giant Inn. Upon the player's entry to said inn, I just want to trigger the innkeeper to provide a nice simple greeting, as some other innkeepers across skyrim do. Again I've created the quest, the scene, the dialogue, and the trigger. Now I'm trying to figure out how to make them work together. After viewing the quest starting video, I am under the impression that there must be scripts attached to the trigger to make the innkeeper speak. (In the video example, the author uses a player-activated bar stool to get the NPC to take a seat next to the player, speak some dialogue, and give the player an item.) I don't necessarily want or need the innkeeper to move, just to speak the dialogue as the player passes through the trigger box.

 

And yes, as I delve further into the CK I've definitely noticed that things aren't always as they seem.

Thanks again for the help.

-Chew

Link to comment
Share on other sites

Ok, here we go:

Option A

1) Create your 'Dialogue Topic'= record the line your npc will say, in the "Dialogue View" tab.

* Don't forget to check the "Say Once" if you need that line to be said only one time and no more.

2) Create a "Global Variable" and set it to "0", make it with a distinct id so you can find it easy when it'll be needed.

3) Create an "AI Package" with package template "SAY", and add to it:

- Your created Dialogue line Topic.

- In the conditions tab, add "GetGlobalValue > Yor Created Global Variable = 1"

4) Add the package to your npc and be sure that it's at the top of the package stack.

5) Create a 'Trigger Box' and place it where you need the whole thing to fire.

6) Add to the trigger box this script:



Actor Property MyActor Auto
{Select the Inn Keeper}

GlobalVariable Property MyGlobalVariable Auto
{Assign Your Global Variable}


EVENT OnTriggerEnter(ObjectReference akActionRef)
If ( akActionRef == Game.GetPlayer() )
MyGlobalVariable.SetValue( 1 )
Utility.Wait(0.1)
MyActor.EvaluatePackage()
Utility.Wait(0.1)
Self.Disable()
Self.Delete()
EndIf
ENDEVENT



Option B

In your quest go to the "MISC" tab and create a new "Hello" topic and record there your line.

* Don't forget to check the "Say Once" if you need that line to be said only one time and no more.


This option is way simpler, but it will only fire when the player is at a certain distance from the npc holding the line and only when it first meets the player.


Another option using the same logic mentioned above is to create an "IDLE" topic and add a condition "GetDistance - Player >= 512" or whatever number/distance you need.


This is kind of random (when it will fire), but from my experience the "IDLE" dialogue is checked by the game every 3 to 5 seconds, i haven't actually counted it but after creating around 1000+ lines in the all the "Combat" - "Detection" - "Service" - "Misc" dialogue categories for the follower droid i've been working the last 6 months, i can get pretty close on the timing in which each 'Dialogue Function' gets checked.



*** Don't forget to add all the corresponding condition to your "Dialogue Line" that it's needed for the lines to fire, if you are not entierly sure just take a look at some tutorials, i'm pretty sure that they cover this. To whom this line belongs / can only be said by.


I hope it helps and have a happy modding.




Option C

1) As soon as you enter the inn, Kill the innkeeper!! this way you won't have to worry about how to make him say the line or even speak at all.

Edited by maxarturo
Link to comment
Share on other sites

Maxarturo, you're awesome.

Thank you so much for the excellent information. I was very close to what you said in option B. I'll take another shot at it, I was using the scenes tab for the dialogue.

 

I'll have to study up on the scripting language. I've got a bit of experience in other programming, so I think I'll figure it out. I realize that it will be necessary to learn for a lot of things.

 

Until then, I can very much appreciate "Option C". :thumbsup:

 

Again I thank you.

-Chew

Link to comment
Share on other sites

Just so you know working with the dialogue system and the quest system is a bit more advanced than the rest of the kit. So don't get too frustrated. You may want to try a few homes without using them ... just to get a feel for the kit then go a bit deeper. Just my opinion. You may get "punch drunk" starting there from scratch.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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