Jump to content
  • 0

Simple clear inventory


IVeve

Question

4 answers to this question

Recommended Posts

  • 1

I'm not sure why you'd need a way to clear the entire inventory if you want to give things a chance to be destroyed piece by piece.

Those two seem likely two entirely different things.

 

Anyway, if you want to have a chance of ''removing'' items entirely from the game on death it might be worth looking into the Player's Die method on the server. That should at least lead down to where items are dropped and you could add a second chance on top of the drop rate there to have them destroyed and remove them from the inventory.

Link to comment
Share on other sites

  • 0

I'm making a game where just about every map has PVP enabled with equipment drops. I want to have a chance to drop each item (got that sorted already), but an even bigger chance to not drop the item and destroy it on respawn (my game focuses on having a player-generated economy, so having a resource sink is very important). I'm happy to edit the source, but I'd love some pointers on how to implement this, as I'm having a really hard time navigating the uncommented code.

Link to comment
Share on other sites

  • 0
21 minutes ago, Cheshire said:

I'm not sure why you'd need a way to clear the entire inventory if you want to give things a chance to be destroyed piece by piece.

Those two seem likely two entirely different things.

 

Anyway, if you want to have a chance of ''removing'' items entirely from the game on death it might be worth looking into the Player's Die method on the server. That should at least lead down to where items are dropped and you could add a second chance on top of the drop rate there to have them destroyed and remove them from the inventory.

 

I want to clear the inventory, because respawn happens after death - the items that have a chance already dropped and clearing the inventory will simply remove the rest of the items. Thank you for pointing me to that function!

Link to comment
Share on other sites

×
×
  • Create New...