How do i make the particles not follow 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 community!

    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!

Hyper_Dondon

Supporter
Aug 30, 2023
10
0
1
I wanna make the particles spawn when the player right clicked but the particles keep spawning in the players new position i wanna match just like how it is on the bliss smp since they look cool and i wanna put it into my server

skript version: 2.7.0-beta3
addons i use:

skRayFall v1.9.28
Skellett v2.0.9
skDragon
SkBee 2.17.0

command /redandblackcircle <number>: # number = Size of circle
trigger:
set {_step} to 14 # Set a larger step value here
set {_iterations} to 180 * arg-1 / {_step}
loop {_iterations} times:
set {_angle} to loop-value * {_step}
set {_v} to spherical vector radius arg-1, yaw {_angle}, pitch (0) # Pitch is set to 0 to make it around the player
draw 1 of dust_color_transition using dustTransition(red, red, 1) at location of player ~ {_v}
draw 1 of dust_color_transition using dustTransition(black, black, 1) at location of player ~ {_v}

on right click:
if name of player's held item contains "testitem":
execute player command "/redandblackcircle 0.5"
wait 0.09 seconds
execute player command "/redandblackcircle 1"
wait 0.09 seconds
execute player command "/redandblackcircle 1.5"
wait 0.09 seconds
execute player command "/redandblackcircle 2"
wait 0.09 seconds
execute player command "/redandblackcircle 2.5"
wait 0.09 seconds
execute player command "/redandblackcircle 3"
wait 0.09 seconds
execute player command "/redandblackcircle 3.5"
 
Idk what you got going on there, but I might be able to help. With the power of variables (list variables), this might be possible:

Code:
[command]
    trigger:
        add 1 to {repeat::%player's uuid%}
        if {repeat::%player's uuid%} = 1:
            set {loc} to player's location # call this whenever you need to call the player's location
            [code]
        else if {repeat::%player's uuid%} >= 7: # replace 7 with however many times this cmd will be called in the event
            set {repeat::%player's uuid%} to 0
            [code] # keep calling {loc} whenever you need a player's location
        else:
            [code]

This code is not tested.
I'm pretty sure there is a way to prevent you from having to repeat the code each time, but I'm too lazy to do it. Either way, this should work. Lemme know if you still have problems.

If you want me to explain what this does, you can just ask. By the way, the modified code I wrote has nothing do with skript addons (as I normally don't use those), just plain skript. If you can find a shorter way to do it with or without addons, go ahead. This example is for you to play with =)
 
Last edited:
I realized something. You can simplify this code greatly with functions, but if you want to know how, I kinda need you to respond.