Okay, so my example wasn't the best. I should have mentioned that I know very well that there are other (unnecessarily complicated) ways to accomplish THAT script. The problem is I can't easily show what I'm trying to do with just a script. Therefore, we'll make it a story problem.
Imagine you have a room where you want to trap the player at a certain time. The trouble is, this room has a number of exits that will have to be shut off to do so. Each exit has a door, but if the player recently opened one of these doors, it may still be closing as the trap script executes, and if the player is ready for it, he'll dodge back through the door while it's still opening. There's nothing the script can do about this because it can't affect the door until the door is done raising/waiting/lowering.
Right now you're thinking of a hundred ways to get around this -- the script could wait for the door, or I could have bars or something come down to keep them out. For the sake of argument, let's just pretend none of these methods will work for this situation (because, frankly, they won't). Now how cool would it be if you could just do this?
Code: Select all
script 14 (void) { // Teh l33t trap
Ceiling_Stop(40); // Each door is tagged 40
Door_Close(40, 255); // Close the doors lightning fast if they're open
// Do the rest
}