HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

creating your own aura

10-22-2003, 10:11 AM#1
Goma
how do u create your own aura?

im trying to make an aura that gives the hero and friendly units nearby the ability to slow the opponent down when they attack, kinda like a nuerubian tower
10-22-2003, 11:07 AM#2
Grater
Short Answer: You can't.
Long Answer: You can easily fake it.

Basically what you do is pick every unit near the hero and give the unit the "frostbite" ability (modified orb of cold probably). Make a dummy aura with no effects and the same radius and targets as allowed in the trigger.

The trigger below uses two variables, both of type UnitGroup
UnitsWithFreezeAura : Heros (or units) with the aura, add heros to this group when they learn or are given the freeze aura via a trigger. Remove them from the group when they die. Add them back to the group when they revive.
FreezeAuraGroup : All units under the influence of the aura.


Code:
Frostbite Aura
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in FreezeAuraGroup and do (Actions)
            Loop - Actions
                Unit - Remove Frostbite (Orb of cold)  from (Picked unit)
        Unit Group - Remove all units from FreezeAuraGroup
        Unit Group - Pick every unit in UnitsWithFreezeAura and do (Actions)
            Loop - Actions
                Custom script:   set bj_wantDestroyGroup = true
                Unit Group - Add all units of (Units within 800.00 of (Position of (Picked unit)) matching 
(((Matching unit) belongs to an ally of (Owner of (Picked unit))) Equal to True)) to FreezeAuraGroup
        Unit Group - Pick every unit in FreezeAuraGroup and do (Actions)
            Loop - Actions
                Unit - Add Frostbite (Orb of cold)  to (Picked unit)

It would be a considerable amount of trouble to make it a multi level hero ability, altough still very possible.

With extremely minor modifications that trigger could be used to create almost any aura imaginable, such as bash aura, it could also enhance existing auras, like adding a life regeneration boost to devotion aura or something.
10-22-2003, 12:05 PM#3
Zachary_Shadow
Very nice, Grater, I'll try this out too :)

One thing though, having too many Time - Every 1 seconds events, can and will lag multiplayer games, so a few of them wouldn't do too much. They also need to be dorment untill the skill is taken by the unit/player/hero :)

Still VERY nice :)
10-22-2003, 12:14 PM#4
Grater
Theres actually no need to make it dormant, using a unit group holding heros with the aura takes care of that for ya, if theres no heros with the aura, the group will be empty, and "pick every unit in group"... wont do anything :) Dont add a condition like "If Unit group is empty = false" it will create problems.

The trigger doesn't leak memory because I fixed that (or atleast I took care of everything I could, oops actually it leaks a location). I wouldn't be suprised if memory leaks are most the reason for periodics lag, it's extremely easy to make a periodic leak a lot of memory. In any case, being an aura you could probably make it 2 seconds and it'd be about as responsive as in-game auras.

I might upload a complete set of triggers for custom auras in a demo map at some stage, when I have the time. (weekend probably)

edit: Ooooh I just had another thought, it should be possible to add an aura SFX to the origin of the unit meaning you wouldn't need a dummy aura at all, just a dummy ability with the description. However I'm not all that experienced with SFX, it might conflict with existing, normal auras creating ugly graphic artifacts. So I see some issues, but it might be possible to do some VERY authentic looking auras, you can indirectely check if a unit is currentely affected by auras, that could come in useful.