PDA

View Full Version : Script help. male or female in script not dialog?


randydg
07-18-2008, 06:30 PM
to clerify I need a way in a script to set if male then
PlayMovie("movie", 0);
If female then play
PlayMovie("movie2", 0);
but without a dialog this will be on module load.
thanks,
Randy

Exile007
07-19-2008, 12:04 AM
Pretty sure you'd use something like this for TSL. I don't have KotOR installed so if it's for that game someone else can help you. :)


void main()
{
//checks if male
if(GetGlobalBoolean("000_PLAYER_GENDER") == TRUE) {
PlayMovie("movie01");
}
else {
PlayMovie("movie02");
}
}


That compiles fine, but I'm not sure if it works in-game.

glovemaster
07-19-2008, 08:39 AM
The function GetGlobalBoolean() is not compared with a value. Also i believe it is 0: Male, 1: Female.
Try this script:
void main() {
if(GetGlobalBoolean("000_PLAYER_GENDER")) // Female
QueueMovie("movie_female", 0);
else // Male
QueueMovie("movie_male", 0);

PlayMovieQueue(TRUE);
}

randydg
07-19-2008, 03:20 PM
This code fixes the looping over and over of the movie but playes male movie if male or female.
void main()
{
if(GetGlobalBoolean("000_PLAYER_GENDER") == TRUE) // Female
QueueMovie("intromale", 0);
else
// Male
QueueMovie("introfemale", 0);
PlayMovieQueue(TRUE);
}

glovemaster
07-20-2008, 04:01 AM
This code fixes the looping over and over of the movie but playes male movie if male or female.
void main()
{
if(GetGlobalBoolean("000_PLAYER_GENDER") == TRUE) // Female
QueueMovie("intromale", 0);
else
// Male
QueueMovie("introfemale", 0);
PlayMovieQueue(TRUE);
}


You've added the check again :p
void main() {
if(GetGlobalBoolean("000_PLAYER_GENDER"))
{
QueueMovie("introfemale", 0);
}
else
{
QueueMovie("intromale", 0);
}
PlayMovieQueue(TRUE);
}

randydg
07-20-2008, 10:54 AM
I already tried yours it didnt work

glovemaster
07-20-2008, 12:05 PM
Well, alternatively there is:
void main() {
if(GetGender(GetFirstPC()) == 0)
{
QueueMovie("intromale", 0);
}
else
{
QueueMovie("introfemale", 0);
}
PlayMovieQueue(TRUE);
}

randydg
07-20-2008, 05:15 PM
Nope still not doing it right. now its playing the female movie for both

Dang it this cant be that hard to figure out :/

Edit: due to this was just about to fall of second page, I still need help on this. Is the script being posted not working because its to early to determin male or female for the intro movie?