Add a Effect to the Effect Manager

Let's create a quick sample on how to add a new Effect to the Controller.

For example: We want to create a Ring of dust when the Little Dragon Tiger Jumps in place.

  • Select any character you want to add the Effect. In this Sample we will use the LD Tiger.

  • If the character does not have an Effect Manager component, then we add it:

  • Add a new Effect to the Effect Manager, Rename it "Jump Dust" and give it an ID of 50

  • Select the new Created Effect to show its properties:

  • On the Effect Field ... lets select one of the already made Prefabs.. "Dust Ring"

  • Set the Life Parameter to 4. This will Destroy the Instantiated Dust Ring After 4 Seconds.

  • On the Parent Group, Drag the Root Gameobject of your Character to the Root Field.

This will Instantiate the Dust Ring Effect in the Same Position as the Root Gameobject

  • Set Use Rotation and Is Child to False, that way the Effect won't be child of the Parent Object and it will keep its original rotation instead of the Parent's rotation

  • Now we need to call the Event when the Little Dragon Jump. Go to the Animator Controller of the Character and search for the Jump State Machine.

  • Select the First Starting Jump Animation of the Little Dragon and add a new EffectBehaviour

  • On the On Enter (Time = 0) Set a new Play Effect with the Value of 50.

And that should be it!

Now every time the Little Dragon Jumps it will leave a Ring dust Effect:

Last updated