Advanced          Random


How to Create a Passive Aura
Author: .Talon (udmod.com)Tags: intermediate data behavior aura  
Source: http://www.udmod.com/showthread.php...Added 8 years ago 

This guide will teach how to create custom auras.
You will need basic knowledge of the Data Editor.

Example map: (link)

How it works
Basically, an aura consists of a chain of 2 behaviors and 3 effects; The first behavior (the ability) is attached to the unit that should have the aura. It has a persistent effect that periodically runs a search effect.
The search effect searches for matching units in the given radius and triggers an apply effect that applies the second behavior (the buff) to the target units.
The buff finally does all the things your aura should do.


Creation
The following steps explain, how to create basic auras, which for now will do nothing.
First, create all the Behaviors and Effects:
- Create a Behavior with Type Buff and name it YourAbility -> This is the basic ability.
- Create a Behavior with Type Buff and name it YourAbility (Buff) -> This is the buff applied to all units.
- Create an Effect with Type Create Persistent -> This is the persistent effect
- Create an Effect with Type Search Area -> This is the search effect
- Create an Effect with Type Apply Behavior -> This is the apply effect


Now you created all needed things, its time to link them.
- Go to the ability and change the Effect - Periodic to your persistent effect.
- In your persistent effect, change the Period Effects to the search effect and set Period Durations and Period
Counts both to 1.
- Go to your search effect and change the Areas - Effect to the apply effect.
- Finally, change the Data - Behavior of your apply effect to the buff.

That's it. you created a basic Aura.

When you select your aura and click explain link of the buff, and it looks like you can see below, you did everything right.



Customization
Of course you don't want your aura doing nothing, so this part will explain how to customize your aura with an example of a health regenerating aura, that restores 1 life per second in a radius of 5 to all allied units.

The search effect and the buff are the things that are mainly responsible for how your aura works.
In the search effect you can determine Radius, Unit Filter (Search Filter) and the maximum number of units that can get the buff (Maximum Count).
For the example, the Radius is 5, the maximum count it -1 (which means an infinite amount) and the filter excludes Enemies and Neutrals.
Finally you can set which effect your aura should have on the units in the buff behavior.
Everything you want your aura to change for the target units you have to set here.
In the Example, Vital Regeneration Bonus is set to 1 for Life.


Buff Duration and Ability Period
The Duration of your Buff and the Period of your Ability are also important, and should normally be about the same.
You should Never set the buff's Duration to 0, or it's effect will last forever, even if the unit leaves the aura range.
You can also set the Period of the ability higher than the buff's Duration, then the buff will last the Duration and then disappear for the difference of time, and then be applied again.


Attaching Actors to your Aura
Maybe you also want to make your aura look nice, except from only have this little icon shown at your unit's description.
There are two things you can attach an Actor to: The target units of your Aura, and the unit that has the Aura.

Actor for the Aura Unit:
Create a new Actor of type Model and based on ModelAnimationStyleContinuous.
- Go to Terms and set Cap to 1.
- Set the Model to whatever you want.
- Change Host - Subject to _Unit
- Go to Events - Terms, right click and then Add Event
- Change the Events Msg Type to Effect, the Source Name to your persistent effect and the subname to Start
- Swap to the action below your Event and set the Msg Type to Create

It should afterward look like this:



Actor for target Units:
Create a new Actor of type Model and based on ModelAnimationStyleOneShot.
- Set the Model to whatever you want.
- Go to Events - Terms, right click and then Add Event
- Use the same things, like shown above, except the Source Name, that you should set to your apply effect

That's it, your Aura now has some nice Actors






Star Depot
Contact      Login      Register