Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Dialog Problems...

Page: 1 of 1
 Ferc Kast
01-30-2009, 5:32 PM
#1
While making a dialog for a TSL mod, I kept having 2 conditional script problems.

1) EDIT: Fixed this problem. Dunno what I did wrong, but it works perfectly now.

2) Using the gender conditionals. During the conversation, I have the computer tell the character their gender. I used a male PC (the red-haired vanilla one) while testing, and it told me that my character was a female. :confused: As with the other, I tried messing around to get it fixed, but it remained steadfast in its' decision that my PC was not male.

I've searched the main HL forum and the tutorial subforums, but I've seen nothing that will resolve either of my problems. :( I really hope that someone can help me.
 Star Admiral
01-30-2009, 5:54 PM
#2
Could you post a copy of your script? I'm not sure what is wrong with the talkedto conditional, but for the gender question, you could try adding a ! to the value returned, as it seems that the conditional always returns the opposite of what the player's gender is.

- Star Admiral
 Ferc Kast
01-30-2009, 6:02 PM
#3
Could you post a copy of your script? I'm not sure what is wrong with the talkedto conditional, but for the gender question, you could try adding a ! to the value returned, as it seems that the conditional always returns the opposite of what the player's gender is.

- Star Admiral

As I just edited in a sec ago, the first problem is solved. I used the vanilla TSL scripts (c_isfemale & c_ismale) on their respective nodes. I still get this (http://f.imagehost.org/0848/K2_00027.png) problem, though.
 Star Admiral
01-30-2009, 6:32 PM
#4
You should use the conditional on only one of the nodes. Let's say the male dialog node is first. You would use the c_ismale script in the conditional field. The female dialog node should be below the male one, and not have any conditional scripts for it.

- Star Admiral
 Ferc Kast
01-30-2009, 7:03 PM
#5
You should use the conditional on only one of the nodes. Let's say the male dialog node is first. You would use the c_ismale script in the conditional field. The female dialog node should be below the male one, and not have any conditional scripts for it.

- Star Admiral

That's what I tried. I only got it working by using my own version of the vanilla conditional.

//Why this works and not the other, I dunno.
int StartingConditional() {
object PC = GetFirstPC();
if ( ( GetGender(PC) == GENDER_MALE)) {
return TRUE;
}
return FALSE;
}
 Star Admiral
01-30-2009, 7:06 PM
#6
The only thing that I can think of might be that the vanilla scripts check the gender using a global boolean check, while yours uses the GetGender() function. Perhaps for some reason the global for your character got messed up, but that wouldn't make a lot of sense. At least it works.

- Star Admiral
 Ferc Kast
01-31-2009, 5:02 PM
#7
Well, I have a related problem in the same mod that I had these problems.

An NPC, who I want to continue to face the direction they start out in, re-orients when saying their one-line dialog. So, how do I keep the NPC facing the same direction.

EDIT: And, as before, I managed to fix this problem.
Page: 1 of 1