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.

Script Debugging

Page: 1 of 1
 beancounter
07-28-2004, 10:24 PM
#1
I believe I have found a much better way to debug scripts in KOTOR. I was using the command AdjustAlignment() to signal certain events in my scripts, but I have found a function that will write out to the Feedback Screen.

The command "SendMessageToPC()" will write out your message or variable to the Feedback log.

An example would be:
SendMessageToPC(GetFirstPC(), "This is a test");

This script will print out "This is a test" in the Feedback screen. You can also print out variables, as long as you convert them to a string. While it is not as good as SpeakString(which is broke for KOTOR), it works a whole lot better then other methods I have read about. I hope this helps some of you scriptors out.
 StormTrooper789
07-29-2004, 12:29 PM
#2
A better and more accurate syntax is used below:
object oPC=GetFirstPC();
SendMessageToPC(oPC, "This is a test");
Beancounter, this is just improving your great contribution. The feedback log is in-game,people who don't know that.

P.S. In scripting and programming you should always declare things that will be used more than once.
Page: 1 of 1