Jump to content

Script Errors and Design Etiquette


Lilith

Recommended Posts

In a particular town, I call a relatively large number of town special states, pretty much all of which involve NPC interaction. If the town is hostile, none of these make sense and I don't want them to occur.

 

Now, the *easiest* way for me to handle this, rather than have each state individually check the crime level, would be to have the START_STATE check the crime level, and if it's enough to make the town hostile, run code that contains an intentional syntax error (thus unloading the town script as soon as it's loaded).

 

Apart from one unsightly error message when the party commits a crime and every time the town is loaded after that, there should be no other harmful side effects.

 

Is it bad form to deliberately cause a scripting error to save myself a little work? Should I do it the right way (that is, manually put the check into every state) just to avoid the error message? Are there any problems with unloading the town script that I'm unaware of?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...