#.spawnParticle

1 messages · Page 1 of 1 (latest)

pseudo forum
#
system.runInterval(() => {
        const entities = world.getDimension('overworld').getEntities({ type: 'minecraft:arrow' })
        for (let e of entities) {
const coords = {
    x: e.location.z,
    y: e.location.y,
    z: e.location.z
}
const xVel = e.getVelocity().x;

if (xVel.toFixed(3) > 0.000) {
    world.getDimension('overworld').spawnParticle('minecraft:knockback_roar_particle', coords, new MolangVariableMap())
}

}
},1)

idk if im using it wrong but im not sure why this particle isnt spawning

#

okay but i dont think thats the issue 🥸

#

nah

#

it doesnt 🥸 i think i did something wrong with the .spawnParticle

#

i mean i removed the .toFixed nothings changed. But yeah you were right

#

thank you though

weak trout
#
system.runInterval(() => {
    world.getDimension("overworld").getEntities().forEach(entity => {
        const { x, y, z } = entity.location;
        if (entity.getVelocity().x > 0) {
            entity.dimension.spawnParticle("minecraft:kncockback_roar_particle", {x, y, z}, new MolangVariableMap());
        }
    });
}, 1)