![]() |
/reset npc NAME
It would be nice if you could reset DbNPC's via script
with a NPC.reset(); or if you could do sendToRc( "/reset npc" @ NPC); |
Why?
|
I have certain scripting needs...
|
Quote:
|
I'm using an NPC as a main plot point for my server. It goes to another room and some vars change. Both client and server sides. My current work around is a lot parts of the script setting all the vars back to what they were when I created the NPC, (warpto() and all that) it just be a lot easier if I could just reset the NPC via script. This is more so for convenience.
|
when you're doing a levelnpc in a DBNPC for easier testing, you often have to reset it because of clientside scripting to make the function "onCreated" to be called, therefor, i agree with this idea.
|
Quote:
|
Yeah but the convenience of .reset() seems more practical.
|
You can store all your variables in a new object..
Like this.state = new TStaticVar(); Then declare all the variables as such: this.state.health = 10; Then when you need to clear all the variables, you can do: this.state = null; and then simply initialize it again. |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
onRCChat()
in the Control-NPC then you can do /npc reset whatever |
O_o I have to try this tomorrow, never heard of it.
|
All times are GMT +2. The time now is 07:38 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.