HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Evasion Aura

10-27-2004, 10:56 PM#1
Arkidas
Can someone nice triggerer please post map here with evasion aura trigger sample, I will give rep for it. I want it to have none setting variable=unit in the trigger, because it wouldnt fit my map.
10-27-2004, 11:11 PM#2
Gandalf2349
Oh no, not again.

Sorry, but we're not here to make things for you. We're here to assist you in understanding how the trigger editor works, and how you do things. If you are stuck on some things we can help you here, but we don't make things for you.

Open Trigger editor and try to build the trigger. If there's something you don't know how to do, add a comment line about what it's supposed to do, then post the trigger and we'll try to help you understand how to do it. The goal isn't for someone to do things for you, it's for you to not only do things, but understand how and why you did it, so that you can repeat it again, or build your learning off of it.
10-27-2004, 11:31 PM#3
Arkidas
The problem is I dont know what to do here:I make pick every unit in 900 radius of(WHAT UNIT WITHOUT USING VARIABLE?)
10-27-2004, 11:41 PM#4
Gandalf2349
If the spell is passive, I think you're going to want to something along these lines:
Code:
Variables
 EvasionUnitGroup = New Unit Group with no array, and no starting value
Code:
SpellTrigger
 Events
  -Every 1.00 Seconds of the game.
 Conditions
 Actions
  -Pick Every Unit in EvasionUnitGroup and do Actions
   -Loop
    -Pick Every Unit within (900.00 of (Picked Unit) and do actions
     -Loop
      -Make a dummy unit with an evasion spell that is invisible and order him to cast it on the (Picked Unit).
      -Remove the (Picked Unit)
Then you need another trigger that when a unit learns the skill you add him to the unit group. See if you can do that on your own.

You'll have to test it. I'm not sure how it will react with multiple pick Unit actions. I'm pretty sure that will work though, because the second loop should override the first loop.
10-28-2004, 10:15 AM#5
xxxSpikexxx
evension spell? never heard of such a spell gandalf ...

well this is the way i would do it using evasion group for all units that have the aura(perhaps its more than one):

Code:
event
   every second
action
   -Pick Every Unit in (units owned by playerX) and do actions
      -loop
          -remove "evasion (aurabuff)" from picked unit
   -Pick Every Unit in EvasionUnitGroup and do Actions
      -loop
          -Pick Every Unit within (900.00 of (Picked Unit) and do actions
               -loop
                   -add ability evasion (aurobuff)

what it does is adding and remove the a custom evasion that is used as the auras buff and no unit should have it initially.

the bad thing about is that the units will get an evasion icon instead of a buff ... sadly i just don't know any buff with evasion effect ...
10-28-2004, 12:32 PM#6
Arkidas
you might maybe want to know spike, that you can not say (Picked Unit) in the unit within range event, open your WE and see it your self....
10-28-2004, 03:11 PM#7
logik
you can also use darky28's custom auras... you just add the spell you want to give them where it says... i think there is a bug when the caster dies... but meh
10-28-2004, 09:10 PM#8
Gandalf2349
I meant a custom spell. It would be a modded version of evasion, except it isn't passive.
10-29-2004, 12:50 AM#9
th15
I'm not sure, but can't you just add the evasion ability to a unit when it is attacked and has teh aura buff? i.e.:
Code:
Event:
Unit is attacked

Condition:
Attacked unit has evasion buff

Actions:
Add evasion to attacked unit
wait 2 seconds
remove evasion from attacked unit

I'm not sure if that will bug up on instant hit attacks but it should work for most and lag a lot less than those nasty pick-all triggers.
10-29-2004, 11:31 AM#10
xxxSpikexxx
your trigger would be fine but the wait is way to inexact...

imagine there are 3 unis that attack the buffedunit...

attack times:
Code:
.-- 1st starts: PC waits 2s
|    1st hits at the 0.5th sec
|    2nd starts: Pc waits 2s
|    2nd hits at the 1.5th sec
|    3rd starts: pc waits 2s
 '> PC waited 2 secs and removes evasion
    3rd hits at the 2.5th second - no evasion

thats the problem ... the trigger will remove the ability after 2secs no matter if there is somone still hitting ... thats just not exact enough wait actions are often quite deadly for abilitys
10-29-2004, 01:45 PM#11
th15
if you're not using the custom value for units then you could use it to make a fail-safe evasion aura.

Replace the actions from my previous triggers with:
Code:
Acitons:
Set custom value of attacked unti = custom value of attakced unit + 1
Wait 2 seconds
Set custom value of attacked unti = custom value of attakced unit - 1
If- condition: Custom value of attacked unit = 0
     Then: Remove evasion from attacked unit
     Else: Do nothing
10-29-2004, 08:44 PM#12
Gandalf2349
Or just use local variables...

And the problem isn't that it wouldn't be on for the 3rd hit or so, the problem is you would have multiple instances of it.
Code:
Variables:
 tempUnit as Unit no array
Code:
Events
 -A Unit is Attacked
Conditions
 -Attacked Unit has Evasion Buff = True
 -Attacked Unit has Evasion Ability = False
Actions
 Custom Script: local unit udg_tempUnit
 Give tempUnit Evasion Ability
 Wait 2.00 Seconds
 Remove Evasion Ability from tempUnit

That should work i think.
10-30-2004, 12:28 PM#13
xxxSpikexxx
i don't know anything of custom cripts nor do i trust them. anyway ... what do you do to prevent the problem i mentioned?
the ability will still be removed will it not?

why do we even bother? i think it's best to just give and remove the avasion ability for any unit near the aura one ...

Code:
events
  - periodic every second
conditions
actions
  - pick all unit's matching condition (matching unit has evasion aura buff = false)
     - remove avasion(custom) from picked unit
  - pick all unit's matching condition (matching unit has evasion aura buff = true)
     - add avasion(custom) to picked unit
the problem would only be to figure out which level the aura has but all our triggers have this problem and there are ways like using upgrades custom values for the auraunit and so on...
10-30-2004, 12:33 PM#14
xGT4x
Gandalf stop spamming shit on the forums, thats exactly the same as th15 said but your's wont even work because your udg_tempunit variable is just "No Unit", you didn't set that variable to anything...
Additionally I think we have to wait for Blizzard to enable us hiding the button of ALL passives to do such spells... However I got an idea, it may work for this aura, I'll test it and notice you if it worked.
10-30-2004, 12:37 PM#15
xxxSpikexxx
yes with my script the evasion will have an icon all the time but that's not that dramatic ... is it?

also once i created an ability thats originally an item ability and made it a unit ability and it had no icon ... perhaps you should try to change the amulett of evasion ability to a unit ability and it will have no icon... than my trigger would work perfectly.

but i don't know if all item ability have no icons.

EDIT: i tried it out and sadly only item ability that only items have (like health potion ... healing salve) seem to have no icons...