Sound on item pickup!

Started by Hijitori on Sun, 11/22/2020 - 18:46

Topic category: Help with modding (Java Edition)

Last seen on 12:33, 7. May 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sound on item pickup!
Sun, 11/22/2020 - 18:47 (edited)

Is there any way to set a sound which plays when you pick the item? Or just the sounds plays when player gets this item into the inventory. Any procedure for that?

Edited by Hijitori on Sun, 11/22/2020 - 18:47
Last seen on 18:43, 26. Sep 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
On the procedure in event…
Sun, 11/22/2020 - 22:15

On the procedure in event trigger add a "when player picks up item" in the additional trigger on the procedure, then add a block called play sound... and your sound

Also remember to put this procedure on the block/item tick.

Another thing you can do (that I don't personally know if it will work) is on the item/block triggers click add new procedure on the section: "when item in inventory tick" and put the play sound block and your sound. Hope it helps you!

Last seen on 12:33, 7. May 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yes indeed I didn't see the …
Mon, 11/23/2020 - 11:26

Yes indeed I didn't see the "pickup item" condition because it was on Event Trigger and I didn't check it.

It is called "Entity picks up item" and I also had to add "If "Is Current Entity type of EntityPlayer" and then "Play sound", because when there was no "it must be a player" then constantly some entities picked up items and this sound played like every tick. Thanks!

Last seen on 12:33, 7. May 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
However even though the…
Mon, 11/23/2020 - 11:31

However even though the procedure is on item's tick I want to play the sound when picked up, the sound plays when you pick any item. Any idea to fix this? Maybe item tag is needed to be specified here or smt?

Last seen on 18:43, 26. Sep 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Another idea is to make the…
Mon, 11/23/2020 - 18:18

Another idea is to make the sound play when player has it in inventory. To not make it sound constantly try with the repeat blocks. Hope it helps!