Only allow player to hold one of an item at once

Started by Aksumite on Sat, 05/23/2020 - 06:03

Topic category: Help with modding

Last seen on 07:18, 30. May 2020
Joined May 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Only allow player to hold one of an item at once
Sat, 05/23/2020 - 06:03

I have a powerful item, and was wondering if you can prevent the player from picking up/holding more than one of the item at once.

Thanks!

Last seen on 08:08, 30. May 2020
Joined Jun 2018
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Simply set the max stack…
Sat, 05/23/2020 - 12:48

Simply set the max stack size to 1 for the item.

Last seen on 07:18, 30. May 2020
Joined May 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
This wouldn't solve the…
Sat, 05/23/2020 - 20:17

This wouldn't solve the problem, because the player can still pick it up in a different slot. What I meant was only being able to hold one of the item in the entire inventory.

Last seen on 22:10, 29. May 2020
Joined Nov 2019
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
To not allow pickup, make a…
Sat, 05/23/2020 - 23:24

To not allow pickup, make a procedure element and on event trigger select from the pulldown "when entity picks up item".

Use the code block "has provided entity (item) in inventory". IF blocks to check if true then don't allow pickup. 

Last seen on 07:18, 30. May 2020
Joined May 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • Comments:
Alright, thanks!
Sat, 05/23/2020 - 23:25

Alright, thanks!