Hatchling Cockatrice Lilith Posted January 26, 2005 Share Posted January 26, 2005 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 More sharing options...
Easygoing Eyebeast *i Posted January 26, 2005 Share Posted January 26, 2005 You should always try to prevent errors. Do it the right way. Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted January 26, 2005 Author Share Posted January 26, 2005 You're right, of course. It'll save me work later if I do need to call a state even if the town is hostile, in which case I'll have to rewrite things the right way in any case. I was just throwing around an idea that came to mind, really. Link to comment Share on other sites More sharing options...
Recommended Posts