![]() |
How to check if a level is updated?
Is there a way to tell via npc if a level has been updated?
I have some putnpc's that I want to destroy if the level gets updated and I don't know of any way to go about doing this. |
Quote:
If an NPC is in a level, it gets created whenever the level is updated. |
No. "put npc"
Meaning it's not being created when the level is updated. It stays put. edit: "created" doesn't tell when a level is updated either. just when an npc was created. I can't very well have the npc destroy when it's created, now can I? |
Quote:
HTML Code:
function onCreated() |
Yeah but my problem is that these npcs were placed in the level with putnpc2. So they are only created one time, no matter how many times you update the level. It's quite an important feature I'd be surprised if there isn't some way of detecting an update level via script...
I'll try to get in touch with Stefan I guess. |
After another think of this, I figured you could do it through
HTML Code:
function onPlayerChats()Upon inspection, it didn't work at all... My conclusion being "Script koni_test deleted by Chandler" |
Quote:
|
Actually it's been pointed out to me that "if (updatelevel)" or "function onUpdateLevel()" actually works and does exactly what I need.
Thanks for the help though! Glad to know there is actually a feature for this. So just for anyone that might be searching for a way to do this months from now. if (updatelevel) checks to see if the level has been updated (not if an npc has been initialized or created) So that you can have database npcs know if a level was updated or changed. :) |
Quote:
|
Okay, Stefan answered my PM. (I feel bad now that I already know the answer) But he also mentioned it's for dbnpcs... So I'm not sure the updatelevel event will work in level npcs or weapons...
|
Quote:
|
What a bizarre turn of events!
|
| All times are GMT +2. The time now is 07:15 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.