Grymlorde
Game Owner
NWN NWN: SoU NWN: HotU
Beigetreten: 03 Mai 2002 Von: Grymlorde |
Gepostet: Samstag, 07 November 2009 02:22 |
For my generic henchman conversation, I'd like for the first line to appear if the NPC's alignment is diametrically opposed to the PC (e.g. Chaotic Evil v. Lawful Good). That first line would be "Bug off" or something.
The issue is the conditional script for the Text Appears When. I'm trying to have the condition be "If Lawful Good PC is talking to Chaotic Evil NPC."I've tried several versions of this script and can't get it to compile. What am I doing wrong? Any help would be much appreciated!
_________________ The Grymlorde™ -------------- Christmas Placeables and NPCs by Nethy and the Grymlorde™ |
|
DM-Taino
Game Owner
NWN NWN: SoU NWN: HotU NWN 2
Beigetreten: 03 Nov 2005 |
Gepostet: Samstag, 07 November 2009 03:15 |
By using the Script Generator I came up with this for you. If the PC talking with the NPC is LG, he will say Bugger off. If the PC is CE, there greeted with open arms. And if they are not either alignment then s/he won't speak with them.
It compiles and hopes it works for you.
View Post/Code in separate window
DMT |
|
Grymlorde
Game Owner
NWN NWN: SoU NWN: HotU
Beigetreten: 03 Mai 2002 Von: Grymlorde |
Gepostet: Samstag, 07 November 2009 04:32 |
Quote: Posted 11/07/09 03:15 (GMT) by DM-Taino
By using the Script Generator I came up with this for you. If the PC talking with the NPC is LG, he will say Bugger off. If the PC is CE, there greeted with open arms. And if they are not either alignment then s/he won't speak with them.
It compiles and hopes it works for you.
DMT Thanks DM-Taino, but not quite what I had in mind. I guess I didn't do a good job explaining what I'm trying to accomplish.
I'm building a generic henchman conversation dialog. The very first node will only appear if the potential henchman's (a NPC at this point) alignment is diametrically opposed to the PC. For example, a LG PC talking to a CE NPC will see a conversation node of 'Bug off' whereas all other aligned PCs who talk to the henchman will not get that node and thus will be able to acquire the henchman.
Naturally for that node to be conditional, I have to have a script in the TextAppearsWhen field (which you knew already). Ideally, I would like only one script to check all possible alignments so that I don't have to write 9 different nodes (or customize the generic convo for each NPC). From what I understand, the TextAppearsWhen field scripts are all conditional, i.e. start with "int StartingConditional()" and end with return TRUE or return FALSE.
Since Bioware checks separately for Law/Chaos and Good/Evil, I don't know a good way to set a single condition for PC == Lawful && Good && NPC == Chaotic && Evil. And of course replicate it for NG/NE, CG/LE, etc. I had thought the logic would be something like
View Post/Code in separate window
I couldn't figure that one out so I tried switch case statements and that didn't either.
Any other suggestions? Thanks in advance! _________________ The Grymlorde™ -------------- Christmas Placeables and NPCs by Nethy and the Grymlorde™ |
|
Axe Murderer
Game Owner
NWN NWN: SoU NWN: HotU
Beigetreten: 16 Jun 2003 Von: California U S A Red, White, & Bluuu |
Gepostet: Samstag, 07 November 2009 09:26 |
View Post/Code in separate window
|
|
Grymlorde
Game Owner
NWN NWN: SoU NWN: HotU
Beigetreten: 03 Mai 2002 Von: Grymlorde |
Gepostet: Samstag, 07 November 2009 09:56 |
Quote: Posted 11/07/09 09:26 (GMT) by Axe Murderer View Post/Code in separate window Thanks a bunch! However, the script didn't compile. "(4): ERROR: NO RIGHT BRACKET ON EXPRESSION" For the life of me, I can't see a missing right bracket. Could there be a different reason for not compiling? _________________ The Grymlorde™ -------------- Christmas Placeables and NPCs by Nethy and the Grymlorde™ |
|
Fester Pot
Game Owner
NWN NWN: HotU NWN 2 NWN 2: MotB
Beigetreten: 14 Jul 2004 |
Gepostet: Samstag, 07 November 2009 10:39 |
Line #3.
Quote: switch( GetAlignmentGoodEvil( oPC)
should be -
Quote: switch( GetAlignmentGoodEvil( oPC) )
FP! _________________ Almraiven Shadewood Fate of the Auren |
|
Grymlorde
Game Owner
NWN NWN: SoU NWN: HotU
Beigetreten: 03 Mai 2002 Von: Grymlorde |
Gepostet: Samstag, 07 November 2009 11:51 |
Quote: Posted 11/07/09 22:39 (GMT) by Fester Pot Line #3. Quote: switch( GetAlignmentGoodEvil( oPC)
should be - Quote: switch( GetAlignmentGoodEvil( oPC) )
FP! Yep, that was the fix for lines 3, 5, 12, and 17. Thanks for spotting that!
And a big thanks to Axe and Fester for responding so quickly! You guys rock! _________________ The Grymlorde™ -------------- Christmas Placeables and NPCs by Nethy and the Grymlorde™ |
|