View Single Post
  #6  
Old 10-28-2008, 03:47 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

The best way to accomplish this is to have an invisible NPC on a timer that checks for the presence of the NPCs you want down. Obviously, you'd want to make their IDs unique from other NPCs. They can be the same as each other, however. Once it determines that they are down, you can either have it send a singal to another NPC and then depop, or stop its timer and continue on with the script itself. The one thing you don't want to use is a counter. With counters, if two NPCs go down at exactly the same time, only one will be counted. This is because Perl can only process one action at a time. For a real life example look at: #phase2_timer.pl in potimeb which checks for the existence of the phase 2 wave 1 spawns, and then sends a signal to another NPC to pop wave 2 when they are down.
Reply With Quote