• 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] Ability Problem

Status
Not open for further replies.
Level 12
Joined
Mar 23, 2008
Messages
942
I wanna do a ability that if you receive any kind of damage you becomes invisible and ignore that damage, but I find it very difficult to do.

Tried:

1- Unit is attacked + Unit is target of ability + 100% damage reduction
Results: Works perfectly for everything, expect for aoe damage, unit don't receive the damage, but don't become invis.

2- Unit life becomes less than + Instantly regen
Results: If the unit got some insane regen or healing it will never become invis.

-----------------

Someone have any ideas?
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
You can hav a trigger which detects damage and when a unit is damaged and got the ability you add hp to the damaged guy equal to the damage it takes and then create a dummy unit which casts invisibility on that guy.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Event: Unit - Specific_Unit takes damage


So:
A unit leans the ability, add the event, that unit takes damage to another trigger.
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Clarification:
Is this ability passive or active? If active, what exactly does it do.
You want it to have cooldown?
Just give some more detail about this ability ;)
 
Level 12
Joined
Mar 23, 2008
Messages
942
Clarification:
Is this ability passive or active? If active, what exactly does it do.
You want it to have cooldown?
Just give some more detail about this ability ;)

It have a 60s cooldown, 3 heroes have that ability, its active.
Goes from lvl 1 to 5, each level increase the time you have to receive the damage, and the time you stay invis, going from 1s to 5s.

Thanks for the help ^^
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
Ok. I will make it in a moment.
Edit:
2 triggers:
  • Learning
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to (==) Blah
      • (Level of Blah for (Triggering unit)) Equal to (==) 1
    • Actions
      • Trigger - Add to Takes Damage <gen> the event (Unit - (Triggering unit) Takes damage)
  • Takes Damage
    • Events
    • Conditions
      • ((Triggering unit) has buff Berserk) Equal to (==) True
    • Actions
      • Custom script: local real udg_temp_real
      • Set temp_real = (Damage taken)
      • Unit - Remove Berserk buff from (Triggering unit)
      • Set temp_point = (Position of (Triggering unit))
      • Unit - Create 1 Dummy This dummy has been exported from the SSE for (Owner of (Triggering unit)) at temp_point facing Default building facing (270.0) degrees
      • Unit - Add Invisibility to (Last created unit)
      • Unit - Set level of Invisibility for (Last created unit) to (Level of Blah for (Triggering unit))
      • Unit - Order (Last created unit) to Human Sorceress - Invisibility (Triggering unit)
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_temp_point)
      • Wait 0.01 game-time seconds
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + temp_real)
Base ability is a dummy self cast ability that gives a buff on the caster(like berserk). When a unit has that buff, receives damage, a dummy unit is spawned to make the caster invisible. And then life of the unit is increased by the amount of the damage. So if it is a killing blow, it will still kill the unit. You can use any other method you desire, of making the unit invisible or not taking the damage( like invulnerability).
Including a sample map.
 

Attachments

  • asda.w3x
    19.9 KB · Views: 27
Last edited:
Status
Not open for further replies.
Top