Solved How to stop particles to bug

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

Remo

New Member
Mar 20, 2024
7
0
1
23
Hello, i have problem that somehow the particles got bugged and still spawning when snowball is already dead, it happen if you try to pierce one block on it's corner, the particles are spawning over the block, I don't know how to fix it, if its problem of skript and it still think that snowball is there or it's mine
here's the code


on shoot:
projectile is snowball
{trail} is 1
set {trail} to 0
while block at projectile is air:
if block at location of projectile is air:
play spit at projectile
wait 1 tick
if block at projectile is not air:
cancel the event
 
Last edited:
Hello, i have problem that somehow the particles got bugged and still spawning when snowball is already dead, it happen if you try to pierce one block on it's corner, the particles are spawning over the block, I don't know how to fix it, if its problem of skript and it still think that snowball is there or it's mine
here's the code


on shoot:
projectile is snowball
{trail} is 1
set {trail} to 0
while block at projectile is air:
if block at location of projectile is air:
play spit at projectile
wait 1 tick
if block at projectile is not air:
cancel the event
I have no idea with particles so..
 
Hello, i have problem that somehow the particles got bugged and still spawning when snowball is already dead, it happen if you try to pierce one block on it's corner, the particles are spawning over the block, I don't know how to fix it, if its problem of skript and it still think that snowball is there or it's mine
here's the code


on shoot:
projectile is snowball
{trail} is 1
set {trail} to 0
while block at projectile is air:
if block at location of projectile is air:
play spit at projectile
wait 1 tick
if block at projectile is not air:
cancel the event
Okay for one thing, you're needlessly checking things, you should just be able to do and it should stop when the snowball collides with something.
Code:
on shoot:
    projectile is snowball
    {trail} = 1
    set {trail} to 0
    while block at projectile is air:
        play spit at projectile
        wait 1 tick