Shoot particle

Discussion in 'Spigot Plugin Development' started by Bolt, May 18, 2015.

  1. I'm kinda new to working with particles. How would you shoot particles in a stream?
  2. Iterate through the player's line of sight and send particle packets, or if you actually want them to shoot set the amount to 0 and the offset values will turn into a vector.
  3. @Skionz How do you shoot it exactly?
  4. player.spigot().playeffect() I believe you should be able to figure it out from there.
  5. @Skionz @nikmanG I'm already using player.spigot().playeffect() with all the parameters but I don't know how to manipulate the vectors to shoot it in a stream.
  6. You could Potentially make the shooter shoot a projectile making it invisible with packets. TheN in a runnable while the projectile is flying play the effect at its location.
  7. You don't. You have to simulate that yourself.
  8. @DarkSeraphim how do you hide it? I asked you on another thread and I reached a point where I used the PacketWrapper library but I'm still at a loss on what to do as when I run it, it still returns errors.
  9. @nikmanG I think you might just be lucky. I googled for quite a bit before posting here and couldn't find any relevant answer.
  10. I would only play it for the players that I want to play it for. Player.Spigot#playEffect(...) is player specific :p.
  11. I'll throw out there that EffectLib makes this kind of thing much easier (use LineEffect or a stretched ConeEffect), if you're willing to use a lib.