Solved Skript particles aren't generating

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

20Spaces

Member
Apr 26, 2024
25
3
3
14
I made a Skript that will spawn particles in a circle around the player:


Code:
command /circleparticles:
    trigger:
        set {_radius} to 5 # Adjust the radius of the circle as needed
        set {_angle} to 0
        loop 36 times:
            wait 2 ticks # Add a delay between particle spawns
            set {_angle} to {_angle} + 10
            set {_radians} to {_angle} * (3.1415926535 / 180) # Convert degrees to radians
            set {_x} to x-position of player + {_radius} * cos({_radians})
            set {_z} to z-position of player + {_radius} * sin({_radians})
            set {_y} to y-position of player # Keep the y-coordinate of the particles the same as the player's y-coordinate
            set {_v} to vector({_x}, {_y}, {_z}) # Create the vector using the x, y, and z coordinates
            
            # Debugging: Log the particle spawn location
            send "&aParticle spawn location: %{_x}%, %{_y}%, %{_z}%" to console
            send "&aVecotor length: %{_v}%"
            # Draw particle with skBee
            draw 1 dust_color_transition using dustTransition(red, orange, 20) at {_v}
            wait 2 ticks # Add a 5-tick delay between particle spawns

I'm almost certain the math is correct when I look at the consul output but the particles aren't rendering
 
Try using a different particle and see what happens. The math should be correct but you can also try teleporting the player to {_v} or summoning a mob at {_v} to check. Maybe try raising the Y a little bit?
 
Try using a different particle and see what happens. The math should be correct but you can also try teleporting the player to {_v} or summoning a mob at {_v} to check. Maybe try raising the Y a little bit?
Interesting.. mobs don't seem to be spawning at the vector, did I maybe create the vector wrong? Maybe I messed up the syntax?
 
Does it say the vector location in your chat when you send %{_v}%?
It says (and this isn't exact as I can't open mc rn)

vector location: x: 32.1, y: 37.3, z: 48.1

Or something like that I can check on Friday if that doesn't make sense
 
just rotate a vector around the y axis by a set amount:

AppleScript:
command /circleparticles:
    trigger:
        set {_v} to vector from yaw 0 and pitch 90
        set standard length of {_v} to 5
        loop 36 times:
            wait 2 ticks
            draw 1 dust_color_transition using dustTransition(red, orange, 20) at {_v}
            rotate {_v} around y-axis by 9
 
just rotate a vector around the y axis by a set amount:

AppleScript:
command /circleparticles:
    trigger:
        set {_v} to vector from yaw 0 and pitch 90
        set standard length of {_v} to 5
        loop 36 times:
            wait 2 ticks
            draw 1 dust_color_transition using dustTransition(red, orange, 20) at {_v}
            rotate {_v} around y-axis by 9
Not working... maybe its because its set to pitch instead of yaw?

Edit: while this is probably a problem its not causing the particles to stop rendering
 
Last edited:
yes you're right
AppleScript:
command /circleparticles:
    trigger:
        set {_v} to vector from yaw 90 and pitch 0
        set standard length of {_v} to 5
        set {_loops} to 20
        loop {_loops} times:
            draw 1 dust_color_transition using dustTransition(red, orange, 20) at player's location ~ {_v}
            wait 1 ticks
            rotate {_v} around y-axis by (360 / {_loops})
 
Last edited:
ah yes, i did make that error
AppleScript:
command /circleparticles:
    trigger:
        set {_v} to vector from yaw 90 and pitch 0
        set standard length of {_v} to 5
        loop 46 times:
            draw 1 dust_color_transition using dustTransition(red, orange, 20) at player's location ~ {_v}
            wait 2 ticks
            rotate {_v} around y-axis by 8
Okay the
at player's location ~ {_v}
seemed to fix the problem
 
sorry, I had two versions of the skript on my pc and laptop and I sent the wrong one the first time