Author Topic: Checking Nodes in a Conversation Through Scripting  (Read 485 times)

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Checking Nodes in a Conversation Through Scripting
« on: August 24, 2011, 04:01:35 am »


               I was wondering if there was some way to tell which # / Node in the conversation you were on by scripting?

e.g.

line 1)
line 2)
line 3)

Anyone?
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Checking Nodes in a Conversation Through Scripting
« Reply #1 on: August 24, 2011, 04:14:47 am »


               I don't believe so.

What you could do is have a set of generic scripts that simply set an integer variable on the PC/NPC that determines which conversation node they are currently on.

SetLocalInt(oPC, "CURRENT_CONV_NODE", 1);

And then either put those scripts in the ActionsTaken tabs of those lines or if you have other scripts on those lines then just use ExecuteScript to execute the "node" scripts. This is the only options that comes to mind anyway.
               
               

               


                     Modifié par GhostOfGod, 24 août 2011 - 03:18 .
                     
                  


            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Checking Nodes in a Conversation Through Scripting
« Reply #2 on: August 24, 2011, 05:09:20 am »


               Yes, that makes a lot of sense too Ghost...

That would eliminate a lot of redundancy in the needed scripting for checking too!

Thanks for the tip. '<img'>
               
               

               
            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Checking Nodes in a Conversation Through Scripting
« Reply #3 on: August 24, 2011, 05:21:09 am »


               Maybe a dynamic convo could give you the flexibility and control you're looking for. Nwnx_events for Linux is known to handle most(if not all) convo events, yet if you're under Windows(like me, unfortunately) you could still use a very useful(yet not perfect) system named ZDialog. Dynamic convos are a little complex at first but they are well worth it!

Kato
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
Checking Nodes in a Conversation Through Scripting
« Reply #4 on: August 24, 2011, 05:46:47 am »


               Kato hit both options. With nwnx_events, you can get both the relative and absolute convo node of a convo. With a dynamic convo system like z-dialogue, you can know what it is, as well, and it doesn't require a nwnx plugin.

Funky
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Checking Nodes in a Conversation Through Scripting
« Reply #5 on: August 24, 2011, 05:47:36 am »


               I'll just do a custom include for checking, it will reduce the # of script some, already at 367 and counting, meh!

It may be too late to turn back now though...

I'll look over this Z-Dialogue thing, you got a link Funky?
               
               

               


                     Modifié par _Guile, 24 août 2011 - 04:48 .
                     
                  


            

Legacy_Kato -

  • Hero Member
  • *****
  • Posts: 747
  • Karma: +0/-0
Checking Nodes in a Conversation Through Scripting
« Reply #6 on: August 24, 2011, 09:29:12 pm »


               Well if I may, I would advise you use the one packaged with HGLL since it was somewhat updated and cleaned of some of it's initial bugs(Sorry if there is a newer version I'm not aware of, I have seen none yet).

Kato
               
               

               


                     Modifié par Kato_Yang, 24 août 2011 - 08:29 .