This is just a matter of altering the script that is already there. For this example I will use the script nw_02_classlow treasure script. The same alteration can be made to all of them. When the chest is first opened, the Local Variable on the chest called "NW_DO_ONCE" is 0. Therefore the treasure spawns. After that the Local Variable is then set to 1. Which prevents the treasure from respawning because of the "if" statement. We simply need to add a delay time and set the int back to 0 so the treasure can spawn again. Replace the following script in the OnOpen node of the chest or placable.
Attributes | Values |
---|---|
rdfs:label |
|
rdfs:comment |
|
dcterms:subject | |
abstract |
|