1

I need some help with a cool command I'm trying to make using either 1 or multiple command blocks in 1.10. I'm trying to activate the sweepAttack particle based on the direction the player is facing upon an attack to an entity. Not only that, I'd like to make the attack look and act like a barrage of attacks hence the usage of the sweepAttack particle. So to sum up what I'm trying to make is: whenever a player attacks an entity there will be 5 individual attacks with 1 swing of a sword or any other thing in your hand along with the sweepAttack particle based off of the direction the player is facing to add a bit of realism to it. Can you help me make this possible in-game?

0

Next time, please inform us what you have already tried.

I have been working on a solution for a few hours, this question quite intrigued me. However, I have been unable to find a way to get it to work in 1.10.X

A solution is to use 1.13.X where they have introduced the new relative notation - the caret (^)

First, set up a scoreboard looking at minecraft.used:minecraft.diamond_sword

/scoreboard objectives add Sword minecraft.used:minecraft.diamond_sword

Next,

/execute if score @p Sword matches 1 run execute as @a at @s anchored eyes run particle minecraft:sweep_attack ^ ^ ^2 0 0 0 0.01 20 force

This looks for if the player has used a sword

Next go all of the particle command blocks (in your case, 5)

All command blocks to be chain, and conditional

/execute at @a[scores={Sword=1}] run particle minecraft:sweep_attack ^ ^ ^2 0 0 0 0.01 20 force

At the end, the last conditional chain command block

scoreboard players set @a Sword 0

cmdblock setup

Hope I helped - I spent a couple of hours working on this. Feel free to reply if you need anything or any changes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.