Jump to content

Prevent player from dropping item.


orkel1215

Recommended Posts

How do I prevent the player from dropping an item ? I still want the player to be able to store the item in a container and have the item have weight. I have been unable to find a solution to this. Any help would be greatly appreciated.
Link to comment
Share on other sites

Attach a script to the item with an OnDrop block. Make the block Disable and MarkForDelete the item when dropped and add back another copy of it to the player's inventory.

How do you add back the object? Player.additem <ObjectID>, How do I get the ref? Getself always returns 0

Edited by orkel1215
Link to comment
Share on other sites

Try using "this" keyword as reference then. And yes use, Player.AddItem object ID 1 1. The last 1 means it will hide the item added message

So I found that using implied references works.

let rSelf := GBO
let fCondition := GetCurrentHealth
player.addItemAlt rSelf 1 fCondition 0

"This" Also didn't work it actually through an error for that.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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