Author Topic: Help with a Text Appears When... Please...  (Read 686 times)

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Help with a Text Appears When... Please...
« Reply #15 on: August 21, 2011, 12:35:58 am »


               Shiek, the reason the modified scripts that I gave you didn't work is because you added return TRUE to the bottom of each one. You needed to add return FALSE; instead. Each conditional script should return either TRUE or FALSE.

So for an NPCs conversation text it works as follows:
If a conditional script returns true, that particular conversation node is selected. Therefore the other conversation nodes will not be checked.

if a conditional script returns false, the conversation node is not selected. Therefore the next node will be checked, and the process repeats.
               
               

               
            

Legacy_Shiek2005

  • Full Member
  • ***
  • Posts: 179
  • Karma: +0/-0
Help with a Text Appears When... Please...
« Reply #16 on: August 21, 2011, 12:40:25 am »


               Interesting, thanks for the info guys, might help save me a headache or two in the future '<img'>
               
               

               
            

Legacy_Roddish

  • Jr. Member
  • **
  • Posts: 82
  • Karma: +0/-0
Help with a Text Appears When... Please...
« Reply #17 on: August 21, 2011, 08:42:45 am »


               why must you return true or false specifically??

why not in halfling detection simply write;



return ( GetRacialType (GetPCSpeaker()!= RACIAL_TYPE_HALFLING );


or when detecting phenotype on the next npc line;

return (GetPhenoType(GetPCSpeaker()) == PHENOTYPE_BIG);




why bother declaring variables if you dont need them? 


 
               
               

               


                     Modifié par Roddish, 21 août 2011 - 07:46 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Help with a Text Appears When... Please...
« Reply #18 on: August 21, 2011, 10:15:51 am »


               Roddish, each of those statements return the equivalent of either TRUE or FALSE.

Since Shiek is using Lilac Soul's script generator it didn't seem worth while to provide code as concise as yours.
               
               

               
            

Legacy_Roddish

  • Jr. Member
  • **
  • Posts: 82
  • Karma: +0/-0
Help with a Text Appears When... Please...
« Reply #19 on: August 21, 2011, 07:07:47 pm »


               that'll teach me to not read code comments. again. lol.

but on the other hand, it cannot harm to know that there are more efficient ways to do this, offering actual code help to users who possibly only work with wizards can only help them solve their own problems going forward. or at least thats what i hope '<img'>

i guess i'm just too used to trying to reduce my own workload. please pardon my clumsy posting