Author Topic: Subrace dialogue  (Read 637 times)

Legacy_YeezY

  • Newbie
  • *
  • Posts: 8
  • Karma: +0/-0
Subrace dialogue
« on: April 11, 2016, 05:56:38 pm »


               

Is this possible to do something only if player have one of Subraces? I mean, if u have Subrace "Drow" then NPC will talk with him, in other case - he will ignore him. I know there is something like GetSubRace but I dont know how to use it.


 


Can u explain how to use it? Write some example.



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
Subrace dialogue
« Reply #1 on: April 11, 2016, 11:31:32 pm »


               http://www.nwnlexico...itle=GetSubRace


So, for example, a conditional script in conversation might contain


return (GetSubRace(OBJECT_SELF) == "Drow");


If you understand scripting (see Lexicon Primer), the only special issue is dealing with the free format of the subrace name, discussed here:

http://nwn.wikia.com/wiki/Subrace


That could be avoided by having an initial conversation with the player, using SetSubRace to store their choice in a fixed format.
               
               

               
            

Legacy_meaglyn

  • Hero Member
  • *****
  • Posts: 1451
  • Karma: +0/-0
Subrace dialogue
« Reply #2 on: April 12, 2016, 12:00:31 am »


               

Probably safer to use GetPCSpeaker there though, instead of OBJECT_SELF. Especially since the OP was talking about an NPC conversation '<img'>