Topic category: Help with Minecraft modding (Java Edition)
as you can see in the screenshot if the birthday hat (projectile) hits player the procedure adds luck effect and sends message to all players "birthday hat is put on" if the player doesn't have active the luck potion effect but it's impossible because the projectile adds the potion effect luck to a player if he is hit with the projectile so it won't work like that.
luck potion effect - to let the player who throws the projectile know that the player who has particles is already hit with the projectile
remove 1 birthday hat - to give the player who throws another chance to hit the target if the projectile is just thrown and it didn't hit any target
send chat message to all players - to let them know that a player is hit , if 5 players is hit (5 times the chat message) the player with birthday hat wins the game
so that's how i want the procedure to work. can someone help me?
Try checking if the player has luck before you add luck (like move the procedure block to the first spot in the procedure).