id_geo
Hello!
Please, assist.
How to set up the interaction with NPC in a shop-manner?
What I mean:
NPC is a seller, my player is a buyer.
NPC sells an apple, the cost of an apple is 1 item of whatever (gold)
Is it possible to set up the change: I give money (gold) to NPC and receive from it an apple?
-
It certainly is, Dmytro Ivanenko!
Here's a link to a video I made explaining how to do it: https://youtu.be/vYhRrpEEbrw
Just one slight change to what I've recorded: with the NPC, use @initiator rather than @p
NPC can use @initiator (command blocks can't), so that only the player interacting with the NPC will be targeted with the actions.
0 -
Thank you, Dani Noble
This is exactly what I'm currently trying to understand.
Thanks again!
0 -
Your quite welcome Dmytro Ivanenko!
1
Please sign in to leave a comment.
Comments
3 comments