How do I make a villager do different things when clicked on multiple times?
load.mcfunctionin data packs is for anything in-game when reloaded. And
tick.mcfunctionis for anything occuring according to in-game ticks. With this limited knowledge I got villagers to
/tellrawback at me when in a certain range. I also got a villager to
/tellrawback at me when clicked (using objectives timer dummy and
I wanted to make the same villager respond to me differently on each click. I know one can check the minimum score and proceed that way, which I tried to by the way, and now everything broke.
I reverted back to the old state of villagers responding when in range. Would someone be kind enough to help me with villager talking on click and multiple response (3)?
Analeea last edited by
I think you were on the right track with the scoreboard idea. You could probably always reset whatever scoreboard tracks for interactions with villagers, then execute at a player who's score is 1. At this player, you would then run a command to generate a random response based on game tick or game time. Or you could use predicates of chance (20% etc)