#(danjoe3) Animate Particle Learning

51 messages · Page 1 of 1 (latest)

slow wind
#

Hey there,
I just wanted to explore particles and animate them because I'm starting to have a grasp on Denizen scripting. I know it involves a lot of maths, which I don't know very well. Is there any possibility that I could learn the fundamentals and what I might need to go through? I've gone through the Halo script that was there in the forums, and I intend on testing on that for sometime too.

fossil hearthBOT
#

(danjoe3) Animate Particle Learning

fossil hearthBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

queen nova
#

Did you have any goals in mind? There's many ways to do particle animations

slow wind
queen nova
#

looks like the plugin is open source, which is a good reference if you'd want to recreate some of them in denizen

#

i remember a particle library being somewhere as well

#

in essence though, doing anything related to particles in a unique way is related to graphing in 2D or 3D space one way or another

#

having knowledge on either of those is a great foundation to have in order to understand what, and why people code particle animations the way they do

#

just for starters this command will make a fire circle around your feet

#

playeffect effect:flame at:<player.location.points_around_y[radius=2;points=90]> offset:0

#

sometimes there are tags that can make doing these easier

queen edge
#

If you don't wanna deal with maths there are also pre-made effect libraries like EffectLib

#

!c effectlib

fluid roostBOT
# queen edge !c effectlib
Required Plugins or Platforms

Depenizen, EffectLib

Group

Depenizen

Syntax

effectlib [type:<effect>] (origin:<entity>/<location>) (target:<entity>/<location>) (for:<player>) (effect_data:<map>)

Short Description

Show custom effects using EffectLib

Description

Displays EffectLib effects.

Specify which effect to display using the 'type:' argument, note that effect names are CASE-SENSITIVE.

The origin is the entity/location to play the effect at. If an entity is specified, the effect will follow it.
Defaults to the linked player if unspecified.

Some effects (such as the 'Line' effect) require an origin and a target, an effect's target can be a location or an entity.
If an entity is specified, the effect will follow it.

You can optionally use the 'fo...

slow wind
#

Oops, I'm sorry about the ping!

#

Meant to remove it

slow wind
slow wind
grizzled dirge
#

one tag you'll use a lot is rotate_around_(xyz)

#

!t location.rotate_around

fluid roostBOT
grizzled dirge
#

all of those

#

the only trick with them is that they rotate with 0,0,0 as their axis

#

no clue if im englishing correctly so pardon me if i say anything wrong

grizzled dirge
#

bc lets imagine you want to rotate a location along the player, but that player is in 100,100,100

#

all of those tags would instead rotate it along 0,0,0

#

so you'd get the rotated particle WAAAY off

#

i generally use <location[0,0,0]> as my starting point

#

in some of my scripts there's literally
- define 000 <location[0,0,0]> because i know i'll be using that for rotations later

#

then, lets say i want the particle to be one block above the player

#

ez, <[000].above>

#

now, that's a vector

#

you cant play a particle at a vector

#

so to actually give it a place, we'll do

#

<[000].above.add[<player.location>]>

#
- define 000 <location[0,0,0]>
- repeat 4:
  - define points:->:<[000].forward.rotate_around_y[<[value].mul[90].to_radians>]>
- define points <[points].parse[add[<player.location>]]>
#

wrote this rq

#

it gets 000, creates a point at .forward, and then rotates it 90 degrees across the y axis every loop

#

then turns all those vectors into real locations by adding a real location to them

#

that should be a square

#

now, vectors can be modified in many, many ways

#

one of the most useful is to multiply them

#

remember real vectors in high school? when you multiply a vector, it has more or less strength, depending on what you multiply it at

#

so if you get that script i sent you and do .parse[mul[0.5]], it'll now be half as big as it was before

slow wind
#

Oh wow, all this is truly helpful!

slow wind
#

But yes, I'll look into these and create other threads to possibly see how I can get better at making particles! Thank you so much though :))