[Spell] Activated aura with different effects to caster and targets

Status
Not open for further replies.
Level 2
Joined
Nov 21, 2015
Messages
15
I don't even know how to start this one.
I want to make an activate-able aura that:
-Decreases the armor of the caster
-Decreases the movement speed of the caster
-Increases the armor of the affected units/targets


How it would work: The aura would have a really small area of effect, so that only a few units around the caster would be affected. It would add 10 armor to the affected units and subtract 5 armor from the caster.
The idea is that this spell would be used by groups of units (every unit in the group would be casting it), so that close together they would have increased armor, but if one of them moved away - he would have decreased armor.

Any advice on how to make this or maybe existing spells that already do this kind of thing are appreciated.
 
Level 2
Joined
Nov 21, 2015
Messages
15
There are more than one way to do this easily.

A very simple way is to use devotion aura as usual and make it give +10 armor.

And then you look up an item ability that increase armor by X, change it to -15.

Then add the item ability to everyone that learns the aura. (done by triggers)
Thanks for the advice. I tried doing it like this (this isn't the final trigger, I just wanted to test adding spells to units)
  • formation
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Activate Formation
    • Actions
      • Unit - Add Formation Armor Decrease (-15) to (Casting unit)
      • Unit - Add Formation (Devotion Aura) to (Casting unit)
But the spells never get added. I tried both Triggering and Casting unit.
Also, the Activate Formation spell is based on Defend.
 
Level 2
Joined
Nov 21, 2015
Messages
15
I don't think "defend" counts as a spell, I think it just counts as an order. Try thunderclap just for testing.
Okay, I did the same thing but using thunderclap. The spells add properly now.
There's just one more thing, is it possible to add the armor decrease spell only when the unit is away from other units?
 
Level 12
Joined
Nov 3, 2013
Messages
989
If you want to use defend, your trigger should be something like this:
  • Events
  • Unit - A unit is issued an order
  • Conditions
  • (Issued Order) Equal to "defend"
  • Actions
  • //Add the Abilities

I'm just going to mention that this way any unit with an ability that use the defend order would give the abilities, add an extra condition "integer level of ability (Custom Defend Ability) greater than 0" to make this only work for units with the correct ability.

Secondly, if you give -15 armor passively and add 10 with the aura, then sure it's going to work like you want when the unit is alone, but what you wanted was for the unit to have a -5 armor bonus alone and a +5 bonus in groups of units with the same ability activated, right? Change it to -5 and check the "Not Self" box in data - targets for the Devotion Aura.

Note that the aura won't show the buff on the caster any more after this change.

I think that there's some trick like making the -5 armor bonus as another devotion aura that only targets self which use the same buff as the other devotion aura that only affects other allies to make the positive buff over-ride the negative one when near another friendly unit, if it works like this don't give +10 any more though, cause I think that the -5 effect should not only show any buff any more but be suppressed as well. +5 should do the trick.

I might be wrong, but at least it should be worth a try if displaying buffs somewhat properly matters.
 
Level 12
Joined
Nov 3, 2013
Messages
989
^I'm just telling him how to catch the event, it was not meant to be copy pasted (since you also gotta convert the order to string).

Don't you mean string to order? Unless you want to write the order as integer, but then you'd do it as custom script or jass.

I think Vorox is smart enough to get the point.

Maybe, maybe not, I wouldn't know. I'm not Vorox.

I'm not insulting anyone's intelligence, but there's no reason not to be as detailed as you can if it's unknown to you what they know or don't know.

Including it won't help less if they already know it while it's going to help more if they don't.
 
Status
Not open for further replies.
Top