Improved Particle Behavior

Luyren

  • *
  • Posts: 1666
Description
Enables this actor to create other actors as particle effects. The particle effects can be created at a random position or at a circumference, and can be pushed to random directions or to specific points.

Comes with two custom blocks:

SetParticleIndex: adds or remove a particle index from the active list.
SetParticlePreset: activates the particles, selecting one of the configured presets.

Triggers:
-StartEmitting: activate particles.
-StopEmitting: deactivate particles.

Attributes to Save:

_Activate: if the particles are active.
_ParticlesOn: list of particle indexes active.

About
This is an updated version of my old Particles behavior. Previously, you could only have one set of particles at a time, with a single movement setting. Now, this works with multiple particles, with individual settings and timers.  Particles now are configured in a list, each index corresponding to a particle, or set of particles, that follow their own spawn and movement setting. You can individually turn on and off each particle index,  and you can also quickly call a set of particles with the new custom blocks. Speaking of...

Custom Blocks
Set Particle Index: turns on or off a particle index. A use case is, for example, you are using indexes 0 to 3 for some special effects, and you can turn index 4 on to show a poison effect. You can turn that index off when the poison effect is done, without affecting the other indexes.

Set Particle Preset: a preset is a series of particle indexes that you can turn on and off based on the preset name. For example, you configure indexes 0 to 3 for a special attack, you can configure a preset called "SpecialAttack", and call that using this custom block, turning on those indexes. It won't affect other active indexes.

Drawbacks from the previous version
Since now you configure everything using a list and a map, if you don't follow the formatting, or you type anything wrong, you will get errors. Always double check the attributes' descriptions and your settings.

Another thing is, since this behavior is more versatile, I couldn't realistically test all possible use cases. If you have issues or find anything that you think might be a bug, let me know.

How to Import it
Get the attached file, go to File > Import Resource, Attach to your actor.
Remember to always back up your games before importing new resources. Go to File > Export Game...

I like this, do you have more stuff?
I made an Actor Parallax behavior a couple months ago.

« Last Edit: May 03, 2019, 04:30:57 am by Luyren »
Working.