Page 1 of 1

Scripting tips for new users

Posted: Thu Feb 23, 2006 8:20 pm
by shadow
Some things I find useful when scripting are...

1 If I want to try out something new in a script, I make a small script with just a pawn and that particular feature.
No movement code, attack code , just the new command.
This way I remove all other variables and concentrate just on one thing.

Once it works properly (and I understand it properly)I then add it to my full script and test again.

Use debug() code in the script and check your results.
Are the results what was expected?


2 Only change 1 part of the script at a time, and test often.
This way its much easier to track down your errors, especially in a really big script.

Hope this helps.

Anyone else have scripting tips?

Posted: Mon Feb 27, 2006 12:09 am
by Ransom
3. Work in LowLevel as much as possible and avoid jumping back and forth between Low and High Level.

4. Framerates suffer dramatically when the console is turned on for scripts - Console(true). So don't judge your framerates until you turn the console off.