|
Development Forum |
 |
| 
Malkin
     Manager

|
12/1/2011 | |
Is there a way of predicting when you'll have to use LOCK on a script?
I mean, a way other than trial and error, or 'this is complex, I'd better lock it' - just after a rule of thumb here.
My TCR Norns |
 Prodigal Sock
Ghosthande
    

|
12/2/2011 | |
Yeah, I usually use LOCK any time a script is long and/or does important things. Interruptions can be hard to test, but if there's even a slim chance that it could royally mess something up, it's good to play it on the safe side. 
For instance, I'll admit I don't always LOCK my eat scripts, because most of the time they're only about three lines long anyways.
One example where I did use the LOCK command is the telescope from Devil's Reef. What it does, in a nutshell, is:
1.) verify that a Norn activated it
2.) determine its own location, and the relative position where the Norn should stand
3.) move the Norn there
5.) animate the telescope being rotated upward, and play a sound effect
4.) zombify the Norn so it won't move, and put it in a certain pose so it looks like it's looking through the telescope
5.) possibly make the Norn report its findings
6.) then un-zombify the Norn so it can move freely again
7.) animate the telescope being rotated downward, and play another sound effect
Given some of the telescope's behaviors (like zombifying the Norn) it could get pretty icky if it was interrupted partway through. So that's definitely something to use LOCK for.
 |
|