Jump to content

Furniture Marker is... Blocked?


iscrybble

Recommended Posts

I have a custom MineOre activator with a new script, copied almost exactly from vanilla but with a key difference: It will reset independent of the cell using the RegisterForUpdateGameTime event. Things seem to be working... almost.

 

Once the appropriate amount of time has passed and I handle the event, it sets the value of a bool 'readyReset' to true. For returning to the cell, the MineOre script runs:

event onLoad()
if readyReset
	self.Reset()
	self.clearDestruction()
	self.setDestroyed(False)
	resourceCountCurrent = -1
	readyReset = false
endif
endEvent

 

When I return to the ore vein, it appears to have worked (ore is glowing again)... except that I can't activate it! The 'mine' prompt doesn't appear. Here's the tricky part! If I then leave the cell and come back, the activator prompt shows and works! :wallbash: Why didn't it the first time?!

 

I've tried everything I can think of with the MineOre script and there doesn't seem to be anything wrong with using the vanilla PickaxeMining marker... so now I've turned to the forum!

 

Please help, I'd really like to solve this! Let me know if any more information is needed!

Link to comment
Share on other sites

Update: I have a workaround... but it still doesn't totally solve the problem.

 

When handling the event (and previously setting 'readyReset' to true) I now use IsNearPlayer() to find out if the player is in the cell. If they are, I set 'readyReset' to true. If they are not, then I call a reset function (reset, clearDestruction, etc).

 

Now, things are working if the player is not in the cell when the event fires. If the player is however, they have to leave, come back, leave and come back again to activate the veins. :confused:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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