PDA

View Full Version : Problem Compiling in KoTOR tool


TheGreenGoblin
07-25-2006, 10:18 AM
What am I doing wrong here?


http://img97.imageshack.us/img97/4647/scriptproblemjg7.jpg (http://imageshack.us)

stoffe
07-25-2006, 10:25 AM
What am I doing wrong here?


You are forgetting to end each statement with a semicolon, and to wrap the string contants with quotation marks. You also have no main function, which is needed as the entry point for running the script. :)

It should be like:

void main() {
StartNewModule("sta_m45aa", "54");
StartNewModule("sta_m45ab", "51b");
StartNewModule("sta_m45ab", "51");
}


However, that script would be rather pointless since only the first line would be executed. Scripts are not run game-wide and script execution would be terminated as soon as the current module unloads, which would happen at the first function call.

Further, are you sure those are the correct tags for the Waypoint objects inside those modules you want the player to appear at? Looks rather unusual to only use numbers as tags.

TheGreenGoblin
07-25-2006, 10:32 AM
You are forgetting to end each statement with a semicolon, and to wrap the string contants with quotation marks. :)

It should be like:

StartNewModule("sta_m45aa", "54");
StartNewModule("sta_m45ab", "51b");
StartNewModule("sta_m45ab", "51");



Oh. :D

[QUOTE=stoffe -mkb-]
However, that script would be rather pointless since only the first line would be executed. Scripts are not run game-wide and script execution would be terminated as soon as the current module unloads, which would happen at the first function call.

I see.


Further, are you sure those are the correct tags for the Waypoint objects inside those modules you want the player to appear at? Looks rather unusual to only use numbers as tags.

I'm trying to get the Dark Side Star Forge Battles to load when I enter the module.

http://www.lucasforums.com/showthread.php?t=141563


Edit: Dang it, it didn't work, as in it isn't compiling still. :(

stoffe
07-25-2006, 11:00 AM
Edit: Dang it, it didn't work, as in it isn't compiling still. :(

I forgot to mention one rather essential part you had left out as well, the main() function. :) I've edited the above post with a fixed script that should compile at least.

TheGreenGoblin
07-25-2006, 11:07 AM
Thanks so much! :D

Darth333
07-25-2006, 11:18 AM
(edit: oops looks like stoffe already took care of this part as I was typing). It seems that you are missing void main() at the beginning. You need to declare this function in all your scripts except the scripts that determine which reply will come next in a dialogue (you have to use int startingconditional() in such cases ).

Try:
void main()
{
StartNewModule("sta_m45aa", "54");
StartNewModule("sta_m45ab", "51b");
StartNewModule("sta_m45ab", "51");
}

However, while this should compile, it won't work ingame. You'd have to specify the conditions under which module has to load or have three separate scripts one for each module and fire each of them when the time comes. Right now, you would likely only see the loading screen of the first two modules and then jump to the third one or only see the first module (I am not sure how the game would process this).

Also, you link to a tutorial about how to play a .bik movie but your script doesn't play any movie, it simply transports your party to a specific module. I don't have the game with me and can't really tell which are the modules you listed so what follows is just a general guess. If you are referring to when your PC fights dark Jedi on the Star Forge, then you would have to redo the battles in your own custon module. If all you want to do is showing those battles as a cutscene without the participation of the PC, you could also just make a .bik movie out of the existing battles and play it via a script.

TheGreenGoblin
07-25-2006, 11:56 AM
However, while this should compile, it won't work ingame. You'd have to specify the conditions under which module has to load or have three separate scripts one for each module and fire each of them when the time comes. Right now, you would likely only see the loading screen of the first two modules and then jump to the third one or only see the first module (I am not sure how the game would process this).



Yeah, I just ended up dividing them into their own individual scripts.


Also, you link to a tutorial about how to play a .bik movie but your script doesn't play any movie, it simply transports your party to a specific module. I don't have the game with me and can't really tell which are the modules you listed so what follows is just a general guess. If you are referring to when your PC fights dark Jedi on the Star Forge, then you would have to redo the battles in your own custon module. If all you want to do is showing those battles as a cutscene without the participation of the PC, you could also just make a .bik movie out of the existing battles and play it via a script.


I understand, I misinterpreted what the post was saying. What I'm really trying to do is have these cutscenes play at the beginning of the first three Star Forge modules. What script should I use in that case?

Edit: I managed to figure it out.