View Single Post
  #15  
Old 02-16-2009, 11:59 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Crow View Post
That's actually a quite interesting question. I rarely use any timeouts in level npcs, so I don't even know what would happen if you would put it inside onCreated(). It might aswell just be called once and stop when the player leaves the level. I'm completely unsure about this one though. If we assume smashing it into onCreated() works equally as well as putting it into onPlayerEnters(), I don't think there are any efficiency differences.
It tends to die when the player leaves the level. In a recent script, I just called onTimeOut() when the player enters, restarting the timeout but not resetting any of the variables.

Quote:
Originally Posted by maximus_asinus View Post
You've said that you don't use timeouts in level NPCs, is that because of security, efficiency/performance, or just personal preference?
Normally it's not really needed. Most of the time you need the timeout no matter where the player is, so you put it in a weapon.
__________________
Reply With Quote