MagicPlugin icon indicating copy to clipboard operation
MagicPlugin copied to clipboard

Add direction(vector) parameter to effects

Open Clexus opened this issue 1 year ago • 5 comments

I see we don't have directional parameters in particle related effects, I think we need it. Particles like flame, cloud can move towards defined direction. And we should have some presets

  1. outward, Particles move away from the source location
  2. inward, particles move towards origin location
  3. W/E/S/N
  4. left/right/behind/front

reference maybe: https://www.spigotmc.org/threads/comprehensive-particle-spawning-guide-1-13-1-19.343001/

Clexus avatar Feb 26 '24 02:02 Clexus

I think this is what particle_data does, unless there is something more modern than that?

NathanWolf avatar Feb 26 '24 16:02 NathanWolf

I think this is what particle_data does, unless there is something more modern than that?

Can you provide some examples? because wiki and reference have nothing related to it and according to the code, it only accepts float numbers. "A special magic data number, use with care, it can crash the client!!" And I don't know what is "magic data number"

Clexus avatar Mar 01 '24 15:03 Clexus

I am just thinking of the magic data number, yes. For some particles, it changes the color, for some the movement.

If there is some new thing where you can specify a direction then you are right, I don't think Magic nor EffectLib supports that so it's something I would need to implement.

NathanWolf avatar Mar 01 '24 16:03 NathanWolf

Though looking at your link, I think you can use particle_offset_x/y/z for the direction and particle_data for the speed.

NathanWolf avatar Mar 01 '24 16:03 NathanWolf

Though looking at your link, I think you can use particle_offset_x/y/z for the direction and particle_data for the speed.

tried, but it flies around but not to the defined direction. like particle_offset_x just make the particles stretch on the x-axis, those particles are still flying everywhere

Clexus avatar Mar 02 '24 10:03 Clexus