• 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.

[Trigger] Gui spell help

Status
Not open for further replies.
Level 2
Joined
Apr 11, 2008
Messages
19
HEllo, to challenge my self on map making, i have been triing to make skills on gui that are purely trigger based.

This one has been bugging me and i cant figure out how to do it. Im triing to create an aura that when an unit is attacked, they get healed for a certain amount

E.g you get hit, theres a 5 percent chance to be healed for 50 damage
Im also triing to get it leveled up so it heals more and the precentages are higher.

Thank you in advance :)
 
Level 3
Joined
Dec 14, 2007
Messages
44
Try this...
  • Melee Initialization
    • Events
      • Time - Elapsed game time is 2.00 seconds
    • Conditions
    • Actions
      • Set HealingAuraDice = (Random integer number between 1 and 25)
  • Healing Aura
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of HealingAura for (Attacking unit)) Greater than 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of HealingAura for (Attacking unit)) Equal to 1
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HealingAuraDice Equal to 1
            • Then - Actions
              • Unit - Set life of (Attacking unit) to ((Life of (Attacking unit)) + 50.00)
            • Else - Actions
        • Else - Actions
For the later levels of the aura you do the samething but change the "(Level of HealingAura for (Attacking unit)) Equal to 1" to HealingAura = 2 or = 3...
Oh and for the aura itself just pick any aura and just get rid of the stats and set HealingAura = The blank aura you made
 
Level 2
Joined
Apr 11, 2008
Messages
19
So whats a way to make it nonabusable... and affect allied units as well? i have no jassing experience

Would this work?
  • Events
    • Unit - A unit Is attacked
  • Conditions
    • ((Attacked unit) has buff Heal Aura ) Equal to True
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Random integer number between 1 and 100) Less than or equal to (5 x (Level of Heal Aura for NeonHealer))
      • Then - Actions
        • Unit - Create 1 Heal Dummy for (Triggering player) at (Position of (Triggering unit)) facing Default building facing degrees
        • Unit - Set level of Holy dummy for (Last created unit) to (Level of Heal Aura for NeonHealer)
        • Unit - Order (Last created unit) to Human Paladin - Holy Light (Attacked unit)
        • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
        • Unit - Remove (Last created unit) from the game
      • Else - Actions
        • Do nothing
 
Last edited:
Level 17
Joined
Apr 13, 2008
Messages
1,608
Your way would not work. It is abusable and it is dumb to create a dummy paladin to heal your unit when you can just simply set it's life to its current life + 50.

Making a simple damage-detecting system requires about 30 seconds of JASSing Experience. You'll need something like this:
Make a dynamic trigger in JASS with a condition: "Unit has myHealingAuraBuff" then in its actions call your GUI trigger. Tadamm! You need almost 0 JASS knowledge to do that.

Erm, I have a sample map around here somewhere which does something similiar.
http://www.hiveworkshop.com/resources_new/pastebin/show/b492ae9a950b834006fd83cf2551734e/

Here, if my memory serves me well I have commented almost everything in that map so it should be easy to understand.
Sorry if I wasn't 100% clear, I'm in a hurry now.
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
  • Healing Aura
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacked unit) has buff Heal Aura - Level 1) Equal to True
          • (Random integer number between 1 and 100) Less than or equal to 10
        • Then - Actions
          • Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + 50.00)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacked unit) has buff Heal Aura - Level 2) Equal to True
          • (Random integer number between 1 and 100) Less than or equal to 20
        • Then - Actions
          • Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + 100.00)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacked unit) has buff Heal Aura - Level 3) Equal to True
          • (Random integer number between 1 and 100) Less than or equal to 30
        • Then - Actions
          • Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + 150.00)
        • Else - Actions
          • Do nothing
The only problems I find with this are:
1) The event is unreliable
2) You have to have a different Buff for each level of the aura because GUI can't configure the level of the ability.
And
3) You may need to set a variable for Attacked Unit or change it to something else entirely.
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
:sigh:
Okay, create a "unit is attacked" event in the trigger editor. Test the map and spam the right click button on a unit and watch your "unit is attacked" event fire every time you click on the unit.. It is crap. Use JASS.

And do not use the "Do Nothing" action since it... does nothing but drains your computer's resources... Argh..
 
Level 2
Joined
Apr 11, 2008
Messages
19
umm i didnt get any of the jass.... <.< and i dont know how to get it to detect a buff...


Couldnt it simplify to this?

  • Events
    • Unit - A unit Is attacked
  • Conditions
  • Actions
    • Set IntlHealLevel = (Level of Heal Aura for NeonHealer)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Attacked unit) has buff Heal Aura Buff ) Equal to True
        • (Random integer number between 1 and 100) lesser than or equal to (5 x (Level of Heal Aura for NeonHealer))
      • Then - Actions
        • Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) + (50.00 x (Real(IntlHealLevel))))
      • Else - Actions
        • Do nothing
Well, can you show me a better way (not in a rude way)
 
Level 15
Joined
Sep 3, 2006
Messages
1,738
The level of Heal Aura won't be calculated unless you have it specifically select the unit who has the ability...right?

@emperor, I already know that. That's why I said there was a problem with the event, but then again, why would your enemy spam right-click on you to heal you if he's trying to beat you? It's not like Juxtapose in DotA ;)
 
Level 2
Joined
Apr 11, 2008
Messages
19
Well, that trigger isnt on.. and neon healer is a variable to the person who learned it. Only one person has that aura... When i tried with using a dummy model.. it worked but the dummies didnt dissapear... but it would only work for heroes that i triggered in ( i made one for each hero) so i wanted one that worked for all units

  • Conditions
    • ((Owner of (Attacking unit)) is an enemy of (Owner of (Attacked unit))) Equal to True
And would adding this line in prevent allies from mass pressing attack on the attacked hero?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
  • Conditions
    • ((Owner of (Attacking unit)) is an enemy of (Owner of (Attacked unit))) Equal to True
And would adding this line in prevent allies from mass pressing attack on the attacked hero?

Yes.

And about the damage detection - whenever a unit is entering the map add the event "Triggering Unit gets hit". This way you will have a accurate trigger while only (well, nothing better in GUI) leaking 1 event per unit.
 
Level 17
Joined
Apr 13, 2008
Messages
1,608
Originally Posted by NeonBladeMaster
Conditions
((Owner of (Attacking unit)) is an enemy of (Owner of (Attacked unit))) Equal to True

And would adding this line in prevent allies from mass pressing attack on the attacked hero?

True, but it would still fire at times when it shouldn't fire.

There is no event called "Unit Gets Hit".
 
Status
Not open for further replies.
Top