#Dynamic Particles

1 messages · Page 1 of 1 (latest)

fossil flame
#

Is there a way to make particles move in the direction i'm facing? Let me explain

I'm trying to make some magical-based datapack, and i know how to make dynamic particles that move in specific directions by setting the amount to 0 and then using the delta section as a vector, so for example if i use particle flame ~ ~ ~ 1 0 0 0.1 0 the flame particle is going to have motion to the right.
Now I wanted to create, for example, circle-shaped particles that spread out from the player's position, which means every particle should move in a different direction facing the opposite way the player is standing at.

I've tried using functions that run multiple times in a tick executing the command based on their relative position and then moving the execute position to the side, but i can't think of any way to make the particle move facing in a way to make them spread out of the player's position, they just all go in a single direction making the whole circle go to the left or to the right.

vagrant sinew
#

You can use caret coordinates for the delta with a high value, plus a low speed, to make them move in the direction the command is executed rotationally
For example: particle flame ^ ^0.1 ^0.4 ^ ^ ^100000000 0.000000004 0 normal

Copy something like this enough times at different rotations and you get a circle

execute rotated ~0 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~15 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~30 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~45 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~60 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~75 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~90 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~105 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~120 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~135 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~150 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~165 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~180 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~195 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~210 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~225 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~240 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~255 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~270 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~285 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~300 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~315 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~330 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~345 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
execute rotated ~360 0 run particle flame ~ ~ ~ ^ ^ ^100000000 0.0000000055 0 normal
fossil flame
#

cause i saw some insane videos (let me know if i can send the link here, so you might have a better understanding on what i mean to do) and they were like moving tornados or circles with insane effects and MANY positions but i doubt they hardcoded each position (which is also dynamic so it's pretty hard to hardcore those) by themselves(?)

vagrant sinew
vagrant sinew
fossil flame
#

i saw they used like "Bolt" as a tool that automatically generates lines of codes for datapacks but using python language and it can be put all together with datapack language, basically mixing both of them

vagrant sinew
#

I made this with MC-Build, yeah, so I didn't have to write all 24 lines by hand. Just wrote one and it generated the rest with a variable

#

But that's an arbitrary convenience

#

This is a very simple and dynamic function, frankly it's a little misleading to call it hardcoded. It is technically hardcoded to make a circle of particles at 15 degree intervals that move outwards from a center point, but you can just change where the function gets executed and the circle will appear there instead of elsewhere. You can go a step further and offset the coordinates relative to the center point, rather than have them expand from the center point directly, by again using caret notation for the position argument

fossil flame
#

wait what's MC-Build? is it a tool?

vagrant sinew
#

It's a preprocessor, like bolt.

fossil flame
#

and what language do i need to know to use that?

vagrant sinew
#

Well that's why I prefer MCB to things like Bolt. Where Bolt lets you write Python code that gets compiled into mcfunction, MC-Build just lets you write mcfunction in a more dynamic and navigable way, while adding some basic abstraction tools like the ability to repeat multiple lines with variables

fossil flame
#

oh

vagrant sinew
#

You can also integrate javascript into it to add further abstraction, but it's not required to use the tool

fossil flame
#

that's more like my "territory" let's say haha i've wanted to start coding in python some time ago but i still need to learn many things and that tool seems way too chaotic for my average datapack requirements (not really complicated mechanics usually, just some addons or some cool changes but it's not anything as crazy)

vagrant sinew
#

Mhm

fossil flame
vagrant sinew
#

Second Google result, not first

fossil flame
#

alright, i'll try that as soon as i get the chance and see what i can do

anyway i've found a way around my request, basically i just run a function that runs itself until a hidden scoreboard hits a specific amount (i set 40 based on the amount of particles i want in the full circle, it's fully customizable this way) so it runs 40 times in 1 single tick and every time the function runs it displays a particle that moves forward and then the armor stand rotates itself by a few degrees, so i get a full circle and after the score hits 40 everything stops and the armor stand is killed