Jump to content

Ore node respawn script?


Deleted56031792User

Recommended Posts

The MineOreScript has includes the following:

event onReset()
 ;  debug.Trace(self + ": is running onReset")
  ;THIS WASN'T WORKING RIGHT
  self.Reset()
  self.clearDestruction()
  self.setDestroyed(False)
  ; if getLinkedRef()
    resourceCountCurrent = -1
  ; else
    ; depleteOreDueToFailure()
  ; endif
  ;USKP 1.3.0 FixStart - if ore is enabled then disable and enable to avoid becoming un-mineable upon respawn.
  if self.isEnabled()
    self.disable()
    self.enable()
  endif
  ;USKP 1.3.0 FixEnd
endEvent

I would surmise then that this event runs whenever the object has been reset (typically when the cell containing the object has been reset). That said, the MineOreFurnitureScript also contains some stuff regarding depletion and resetting. But I think those might be more related to allowing and disallowing the player animation at the ore vein itself.

 

As far as a global timer, I know that if one changes the number of game days / hours to wait for a cell reset and a cell respawn that the ore veins will also update accordingly. But that may be overkill for your needs. I have not seen a timer put in place for just the ore veins.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...