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.

Conditional scripts Kotor 1

Page: 1 of 1
 Darth_Andrez
10-02-2008, 9:51 AM
#1
I'm currently underway with a recruitment/added content mod

My problem is that I understand what conditional scripts do however I dont understand how to make one and what condition it will use?

Any help would be greatly apreciated!

Nanu:¬:12
 Istorian
10-02-2008, 10:59 AM
#2
A conditional script usually starts with a

int StartingConditional()
{
}
instead of a void main()...you also use the return TRUE or FALSE function...perhaps if you tell us what does this conditional do, we may help you more!:D

|I|
 Darth_Andrez
10-02-2008, 2:16 PM
#3
This conditional script makes the dialog appear after a certain line has been spoken
E.G if someone ask's you to help them and you reply yes that would make the npc tell you how to help him next time you speak

and also a dialog starts due to the players alingment points
 Istorian
10-03-2008, 9:02 AM
#4
This conditional script makes the dialog appear after a certain line has been spoken
E.G if someone ask's you to help them and you reply yes that would make the npc tell you how to help him next time you speak

You should really use a local variable for this one...I don't know many things about local variables, as I'm not that experienced, but you could try this thread: Clicky! (http://www.lucasforums.com/showthread.php?t=173587) It's for TSL, but you should get the feeling of how it works!;)

and also a dialog starts due to the players alingment points

That's easy...

If you want the player to be evil to unlock the dialog use this:

int StartingConditional()
{
object oPC = GetFirstPC();

if(GetGoodEvilValue(oPC) <= 25) {
return TRUE;
}
else {
return FALSE;
}
}


If you want him to be good use this:

int StartingConditional()
{
object oPC = GetFirstPC();

if(GetGoodEvilValue(oPC) >= 75) {
return TRUE;
}
else {
return FALSE;
}
}


Hope it works ok!;)

EDIT: You are welcome!:D

|I|
 Darth_Andrez
10-03-2008, 9:06 AM
#5
THank you
Page: 1 of 1