Spawning particles randomly around the player

  • 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!

Status
Not open for further replies.

Tr3nd1ngT0p1c

Member
Dec 30, 2021
1
0
1
24
Basically im trying to make it so a certain piece of armor spawns a cool looking effect around the player but in a singular particle pattern.
Code:
on player armor change:
    wait 1 tick
    if player's chestplate is leather chestplate:
        set {cp1.%player's uuid%} to true
        wait 1 tick
        loop blocks in radius 3 around player:
            add loop-blocks to {_b::*}
            set {coords} to random element of {_b::*}
            wait 1 tick
            if {coords} is set:
                play 1 dust using dustOption(blue, 2) at location {coords}

this is what I got and it spawns particles 1 at a time but at the players feet but I cant seem to make it spawn the particles randomly around the player.
 
I used this for one of my past projects, hope it helps. (Uses SkBee in case you do not, even tho it seems you are)
Code:
every 0.5 second:
    loop all players:
        loop-player is {MER}
        chance of 10%:
            play 10 of falling water above loop-player offset by vector(0.5, 0, 0) with extra 0
        chance of 10%:
            play 10 of falling water above loop-player offset by vector(0, -0.5, 0) with extra 0
        chance of 10%:
            play 10 of falling water above loop-player offset by vector(0, 0, 0.5) with extra 0
        chance of 10%:
            play 10 of falling water above loop-player offset by vector(0.5, 0, 0.5) with extra 0
        chance of 10%:
            play 10 of falling water above loop-player offset by vector(0.5, -0.5, 0.5) with extra 0
 
Status
Not open for further replies.