• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Need Armor aura ??!

Status
Not open for further replies.
Level 2
Joined
Feb 15, 2009
Messages
12
So i'm working on my new map but i'm bad a little because i'm new in makeing maps :thumbs_up: ...I want spell like this : 20%/23%/25% when the unit is attacked to give him 0.5/0.7/0.9 armor for 20 seconds..When the seconds elapse to remove the armor...(don't give me jass please i cant use jass yet) :grin:
 
Level 2
Joined
Jan 26, 2009
Messages
13
I don't if this'll work because I haven't used it before, but use the Devotion Aura ability, it has a "Percentage Value" check option, which I think you can use to get increased %'s for armor... make it have no model, target self only, put it in a disabled spellbook and give the unit the ability when it casts the spell, remove the spellbook when the 20 seconds is up, done



. . . assuming what i said actually works lol
 
Level 6
Joined
Jan 27, 2007
Messages
208
^i think what TS mean is, if owner of his spell attacked by enemy it will gives chance to increase his armor for 20 second.

If you want to easy way

Event - Unit is attacked
Action
If level of your ability equal to 1
Then Action
If Math random between 20 and 100 less or equal to 20
Then Action Create 1 DummyUnit at attacked unit position
Order last created unit to cast Inner Fire to attacked unit
Add expiration timer to last created unit by 1 second

etc until level 3


sorry if my explanation is too confusing...~_~
 
Level 11
Joined
Nov 15, 2007
Messages
800
If this is only supposed to effect a single unit (I notice you put aura in the topic name, if it needs to effect all units within an aura range let me know)

Here's what you'll need to do:

  • armor tutorial
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Your Passive Ability for (Attacked unit)) Greater than or equal to (>=) 1
      • (Random integer number between 1 and 100) Less than or equal to (<=) (20 + (3 x (Level of Your Passive Ability for (Attacked unit))))
    • Actions
      • Set point_variable = (Position of (Attacked unit))
      • Unit - Create 1 Your Dummy Caster for (Owner of (Attacked unit)) at point_variable facing Default building facing (270.0) degrees
      • Unit - Add Your Dummy Spell to (Last created unit)
      • Unit - Set level of Your Dummy Spell for (Last created unit) to (Level of Your Passive Ability for (Attacked unit))
      • Unit - Order (Last created unit) to Human Priest - Inner Fire (Attacked unit)
      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_point_variable)
Here's an explanation of everything in case you need it;

The trigger will run and roll a random number every time a unit with this ability is attacked. The trigger is made so that the random number increases with each level of your ability so that it'll scale within a single trigger.

You need to create a point variable to prevent this ability from leaking, and then set it to the position of the attacked unit and destroy it at the end of your trigger (that's what the custom script is for; consider it your first lesson in JASS :xxd:)

Then you create a dummy unit - a unit with the Locust ability and an invalid model so that it will be invisible and unselectable - and add your ability to the dummy unit (some people prefer to just create multiple dummy units with different abilities, I find this way takes less time).

You need to make a second ability that will be cast to add however much armor you want to this unit, and give it as many levels as the passive ability so that it can scale (thus setting the ability level).

You order your dummy unit to cast whatever ability your armor buff is based off of; I used inner fire because it was the first armor boosting ability that came to mind.

You add an expiration timer to the unit so that it won't stay in the game forever and you won't have to remove it manually. Basically an expiration timer works like a summoned unit.

Then you remove the location with Actions - General - Custom Script, replacing the point with whatever your variable is named that you set earlier, to avoid the location leaking memory.


Again, if this needs to be an aura let me know; or, as the armor bonuses you gave are very small, if it needs to stack multiple times let me know 'cause that will require a very different trigger.
 
Status
Not open for further replies.
Top