Jump to content

--Scripting-- More robust and stable convo trigger


andysks

Recommended Posts

Hi all. When I started modding I had much trouble with the stock conversation trigger. gtr_speak_node it's called I think. There are some things it does good, but the general functionality the way people want to mod nowdays is below par. The hang of the controlled companion if the player moves with him, the jump of the PC in the front and so on. So I wrote a script, then KevL took it and perfected it. After that, I made additions to it. The idea is to have a trigger with variables. When the party, any member, enters start convo no matter who is controlled. Check condition state, auto face target etc. Here it is for whoever feels like using it, adding things to it or whatever.

 

 

  Reveal hidden contents

 

Link to comment
Share on other sites

It's important to note that even with this script, as I understand it, the switch to the main character will still occur unless the object to be talked to has "Can talk to non-player owned creatures" set to true in the object's properties.

Link to comment
Share on other sites

Yes Tchos. The script was kinda directed to my campaign where every NPC has the property TRUE. Therefore I just check the PCOnly and instead of a jump only control switches. We experimented with the jumps and switches of party members and I cannot remember if there is an actual way for the jump to not happen and the conversation to fire. I think even the i-point speaker scripts, the reason they don't make a switch is because the convo keeps trying to fire and aborts if the companion is leading... right?

Link to comment
Share on other sites

I'm not sure what you're saying there, but I'm saying that if you want the controlled companion to speak to the object without switching to the first-created PC, then ipoints and any other placeables also need their "Can talk to non-player owned creatures" property set to true, if you're using them as the speaker.

 

When properly scripted and configured, no conversation ever needs to forcibly switch to the main PC, and the main PC is never required to be controlled for the conversation to fire.

Link to comment
Share on other sites

Yeah I guess I didn't phrase it good. I meant that if the player controls a companion AND the NPC has the property FALSE then it is tough (or impossible?) to make it so that the PC Won't get a jump to the front. Anyway, as you say on your last sentence this is not the case. How would you do it so that a false CanTalkToNonPlayerCharacters makes no jump?

Link to comment
Share on other sites

Possibly the easiest way to do it would be to add a line to the speaking script that sets the property on the intended NPC, since it can be done by script. I think that setting it in the On Used script would set the property before the On Conversation script switches the controlled character, if that's where it happens. If not, it would work on the second attempt for sure. But to do it definitively, you could just use the On Module Loaded or Start script to cycle through every object in the module and set the property to true before anyone ever encounters them.

Link to comment
Share on other sites

Yes, I think that if you leave it as FALSE, and do not change it either with a scripted command or in the properties itself, a conversation with such an object will switch to the first created PC regardless of other factors.

 

But depending on whether the switch happens in the On Conversation event or not, there may still be another way to prevent it. I'm not sure, but I don't think it would work, since placeables don't even have scripts in their On Conversation slots and it still happens with them.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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