HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Custom Buff Aura

08-17-2009, 05:24 AM#1
kromatiq
Hi... I've tried looking for a question similar to mine but I have yet to see it.
Anyway, I wanted to ask how I could get units with a specific aura buff to obtain an entirely different buff, and keep it while under the aura buff. I'm pretty new and my triggering sucks...but any help would be appreciated... cause when i start the game I can't select anything.

I tried to use brilliance aura (Cloak) to give units an invisibility ability (InvisBuffAb - based off Inner Fire with Invisibility buff)... but I guess I don't fully understand picking units...or unpicking them

Also is there a way to use the position from the hero instead of using a dummy buff? Do I have to place the hero in the game to use Event - Unit Within Range, or can I use a variable? None of the variables seem to work for it.

No doubt about it that I did something wrong...but can someone tell me how to fix it?
Thanks in advance..

Trigger:
Invis Aura
Collapse Events
Time - every 5.00 seconds of game time
Conditions
Collapse Actions
Set Cloaked = (Units in (Playable map area) matching (((Triggering unit) has buff Cloak ) Equal to True))
Unit Group - Pick every unit in Cloaked and do (Unit - Add InvisAbBuff to (Picked Unit))
Unit Group - Remove all units from Cloaked
08-17-2009, 09:52 AM#2
Pyrogasm
Well, first off you can't just give a unit a buff; that does nothing. Buffs are just the tooltip thing, the effects come from the ability.

And yeah, you could easily do it without using a dummy buff. You'll need a rudimentary knowledge of variables and leak-fixing, but it would look something like this:
Trigger:
Collapse Events
Time - Every 0.50 seconds of game-time
Conditions
Collapse Actions
Set TempGroup = (Units in (Playable Map Area) matching ((Level of (Cloaking Field) for (Matching Unit)) greater than 1)))
Collapse Unit Group - Pick every unit in TempGroup and do (Actions)
Collapse Loop - Actions
Set TempUnit = (Picked Unit)
Set TempPoint = Position of (TempUnit)
Custom script: set bj_wantDestroyGroup = true
Collapse UnitGroup - Pick every unit in (Units within 600.00 of TempPoint matching ((Matching Unit) belongs to an ally of (Owner of (TempUnit))) and ((Matching Unit) has buff Cloak) equal to false)) and do (Actions)
Collapse Loop - Actions
Unit Group - Add (Picked Unit) to CloakGroup
Set TempPoint2 = Position of (Picked Unit)
Unit - Create 1 Dummy for (Owner of (Picked Unit)) at TempPoint2 facing (Default Building Facing) degrees
Unit - Add Cloak (Dummy) to (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Human Sorceress - Invisibility (Picked Unit)
Custom script: call RemoveLocation(udg_TempPoint2)
Custom script: call RemoveLocation(udg_TempPoint2)
Custom script: call DestroyGroup(udg_TempGroup)
Custom script: set bj_wantDestroyGroup = true
Collapse Unit Group - Pick every unit in (Units in Playable Map Area matching ((((Matching Unit) is in CloakGroup) equal to false) and (((Matching Unit) has buff Cloak) equal to true) )) and do (Actions)
Collapse Loop - Actions
Unit - Remove buff Cloak from (Picked Unit)
Unit Group - Clear CloakGroup