Thread: Control-NPC
View Single Post
  #4  
Old 07-17-2006, 04:28 PM
upsilon upsilon is offline
Shmoo
upsilon's Avatar
Join Date: Dec 2005
Location: Birmingham, Alabama
Posts: 58
upsilon is on a distinguished road
Novo, i dont think it is though. On the first restart, the the trigger is always reached. its only subsequent restarts. I do understand this behavior somewhat, the only problem is, that there is no way that i can think of to actually clear the Control-NPC's local variables, or even just disassociate the object from Control-NPC and re-use the variable for a new instance of the same class. Its weird how it works. If you later change the class you are joining to the object in the variable,the new classes onCreated is run. I suspect its actually just joining the old object in that variable to the new class, which doesnt seem like a good default. As the code that joined it to the first class, no longer exists.

I guess what im really confused about is object lifetime. When do they start, and when do they stop? Its not really clear to me from just following the control flow of the script
__________________
Health nuts are going to feel really stupid someday, lying in hospitals dying of nothing. - Redd Foxx
Reply With Quote