1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Spawning particles randomly around the player

Discussion in 'Skript' started by Tr3nd1ngT0p1c, Jan 21, 2022.

Thread Status:
Not open for further replies.
  1. Tr3nd1ngT0p1c

    Tr3nd1ngT0p1c Member

    Joined:
    Dec 30, 2021
    Messages:
    1
    Likes Received:
    0
    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 (Text):
    1. on player armor change:
    2.     wait 1 tick
    3.     if player's chestplate is leather chestplate:
    4.         set {cp1.%player's uuid%} to true
    5.         wait 1 tick
    6.         loop blocks in radius 3 around player:
    7.             add loop-blocks to {_b::*}
    8.             set {coords} to random element of {_b::*}
    9.             wait 1 tick
    10.             if {coords} is set:
    11.                 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.
     
  2. Allan Noyd

    Allan Noyd Member

    Joined:
    Apr 29, 2021
    Messages:
    38
    Likes Received:
    0
    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 (Text):
    1. every 0.5 second:
    2.     loop all players:
    3.         loop-player is {MER}
    4.         chance of 10%:
    5.             play 10 of falling water above loop-player offset by vector(0.5, 0, 0) with extra 0
    6.         chance of 10%:
    7.             play 10 of falling water above loop-player offset by vector(0, -0.5, 0) with extra 0
    8.         chance of 10%:
    9.             play 10 of falling water above loop-player offset by vector(0, 0, 0.5) with extra 0
    10.         chance of 10%:
    11.             play 10 of falling water above loop-player offset by vector(0.5, 0, 0.5) with extra 0
    12.         chance of 10%:
    13.             play 10 of falling water above loop-player offset by vector(0.5, -0.5, 0.5) with extra 0
     
Thread Status:
Not open for further replies.

Share This Page

Loading...