How to do damage if touching a particle?
Is it possible to do a particle effect that damages anyone who touches it? I saw this in a one command youtube video and it seems possible, but I'm not sure if it requires armor stands. Can anyone tell me please?
You cannot detect or target particles. You would use an armor stand to mark a location to run commands, targeting the armor stand itself and not the particles.
Example, where an armor stand inflicts the Instant Damage effect to nearby players:
/execute @e[type=ArmorStand] ~ ~ ~ /effect @a[r=3] minecraft:instant_damage
And a /particle
command to create particles at the armor stand's location as an indicator:
/execute @e[type=ArmorStand] ~ ~ ~ /particle witchMagic ~ ~ ~ 0.5 0.5 0.5 0 10
You can create particle zones with status effects
A relatively new entity, area_effect_cloud
, is a region of particles that applies a status effect, modeled after the Ender Dragon's breath attack.
Try something like this, but replace every x
with a number.
/summon area_effect_cloud ~ ~ ~ {Particle:
<.put your particle here> ,ReapplicationDelay:5,Radius:xf,Duration:x,DurationOnUse:xf,Age:x,WaitTime:x,Effects:[{Id:20,Amplifier:1,Duration:20}]}