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

"Specific unit event"

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

Hmm I don't now the exactly plan of yours but you can do something like that:

  • Test123
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Storm Bolt
    • Actions
      • Trigger - Add to Test456 <gen> the event (Unit - (Target unit of ability being cast) Takes damage)
  • Test456
    • Events
    • Conditions
    • Actions
      • Unit - Kill (Triggering unit)
Greetings
~ The Bomb King > Dr. Boom
 
Level 13
Joined
Mar 24, 2010
Messages
950
ok just do this, you can add any condition to it you need.

  • test
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to (test part 2) the event (Unit - (Triggering unit) Takes damage)
  • test part 2
    • Events
    • Conditions
    • Actions
      • Set CounterBaseDamage = Damage Taken x CounterDamageMultiplier
:)
 
Level 17
Joined
Jun 17, 2010
Messages
2,275
  • Counter Attacked Unit
    • Events
      • Unit - A unit enters Hero of Blade <gen>
    • Conditions
    • Actions
      • Trigger - Add to Counter Base Dmg <gen> the event (Unit - (Triggering unit) Takes damage)
  • Counter Base Dmg
    • Events
    • Conditions
    • Actions
      • Set CounterBaseDamage = ((Damage taken) x CounterAbilityMultiplyer)
  • Counter Ability
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Hero of Blade
      • (Random integer number between 1 and 100) Less than or equal to ((2 x (Level of Counter for (Triggering unit))) + 18)
    • Actions
      • Unit - Cause (Triggering unit) to damage (Attacking unit), dealing (CounterAbilityMultiplyer x CounterBaseDamage) damage of attack type Hero and damage type Normal
      • Unit - Pause (Attacking unit)
      • Special Effect - Create a special effect at (Position of (Attacked unit)) using Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl
      • Wait LvlOfCounter seconds
      • Unit - Unpause (Attacking unit)
Hmm like that?
 
Level 13
Joined
Mar 24, 2010
Messages
950
No a unit is attacked trigger will fire off before a unit takes damage trigger.. try adding the damage after the wait, you need to give it time for the damage to happen before the attack trigger (becuz its instant)

My trigger might have been similar but it was more simplified and exactly was he asked for.
 
Level 17
Joined
Jun 17, 2010
Messages
2,275
No a unit is attacked trigger will fire off before a unit takes damage trigger.. try adding the damage after the wait, you need to give it time for the damage to happen before the attack trigger (becuz its instant)

My trigger might have been similar but it was more simplified and exactly was he asked for.

i cant tho... it has to be instant right when the damage is taken =x mayb instead of a unit is attacked i send the new event from the previous trigger to that one. And your trigger made no sense because it wasnt what i asked for. I asked for a unit being damaged not a spell being cast. If i was casting a spell i wouldve said that but im not.
 
Level 13
Joined
Mar 24, 2010
Messages
950
  • Counter Attacked Unit
    • Events
      • Unit - A unit enters Hero of Blade <gen>
    • Conditions
    • Actions
      • Trigger - Add to Counter Base Dmg <gen> the event (Unit - (Triggering unit) Takes damage)
  • Counter Base Dmg
    • Events
    • Conditions
    • Actions
      • Set CounterBaseDamage = ((Damage taken) x CounterAbilityMultiplyer)
  • Counter Ability
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Hero of Blade
  • **********v What is this doing here for?? to make it semi random? v*********
    • (Random integer number between 1 and 100) Less than or equal to ((2 x (Level of Counter for (Triggering unit))) + 18)
    • Actions
      • Unit - Cause (Triggering unit) to damage (Attacking unit), dealing (CounterAbilityMultiplyer x CounterBaseDamage) damage of attack type Hero and damage type Normal
      • Unit - Pause (Attacking unit)
      • Special Effect - Create a special effect at (Position of (Attacked unit)) using Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl
      • Wait LvlOfCounter seconds
      • Unit - Unpause (Attacking unit)
Hmm like that?

Then your going to need to put this part in the takes damage trigger somehow not "attacked trigger"
  • Actions
    • Unit - Cause (Triggering unit) to damage (Attacking unit), dealing (CounterAbilityMultiplyer x CounterBaseDamage) damage of attack type Hero and damage type Normal
    • Unit - Pause (Attacking unit)
    • Special Effect - Create a special effect at (Position of (Attacked unit)) using Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl
    • Wait LvlOfCounter seconds
    • Unit - Unpause (Attacking unit)
that wait can cause problems you sure this is gonna be MUI ?
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

There is no answer of your last question - why:

Damage: This trigger runs, if the unit really takes damage.

Attack: This trigger run, if the unit swings back to attack and then you press "Stop". The target unit don't take any damage but the trigger will run.

Edit: For real now to solve this problem^^:
  • TestTrigger2311
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Paladin
    • Actions
      • Trigger - Add to TestTrigger2312 <gen> the event (Unit - (Triggering unit) Takes damage)
  • TestTrigger2312
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Acid Bomb for (Triggering unit)) Greater than or equal to 1
        • Then - Actions
          • Set TempInt = ((Integer((Damage taken))) x (Level of Acid Bomb for (Triggering unit)))
          • Unit - Cause (Triggering unit) to damage (Damage source), dealing (Real(TempInt)) damage of attack type Spells and damage type Normal
          • Set TempInt = 0
        • Else - Actions
Just add the %chance to the 2nd trigger and this works then ( I tested it ) [TempInt = Integer variable]

Greetings
~ The Bomb King > Dr. boom
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,286
Events hook up triggers to be executed when the game engine runs a certain step. As such you can not have an event with the subject (where to hook it) being variable. In theory you should be able to unhook triggers and rehook them but for some reason blizzard did not add event unbinding natives.

Fortunatly in SC2 they have an any unit takes damage event but in WC3 you will have to emulate one by banding all units to a trigger.
 
Status
Not open for further replies.
Top