Spell on attack

unska

New Member
Reaction score
1
Is it possible to make a spell trigger on attack or on when you get attacked?

two examples:

1) You hit an enemy and he will get the tornado debuff on him
2) The enemy hits you and he will get the tornado debuff on him

Oh and offtopic, why my Item Attack Frost Bonus won't trigger on units? It triggers only on heroes.
 

Hellohihi

New Member
Reaction score
42
possible, the easiest way to do it without a damage detecting system, will be,

Trigger:
  • Events
    • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set loc = (Position of (Attacking unit))
      • Unit - Create 1 dummyunit for (Owner of (Attacking unit)) at loc facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Acid Bomb to (Last created unit)
      • Unit - Order (Last created unit) to Neutral Alchemist - Acid Bomb (Attacked unit)
      • Custom script: call RemoveLocation(udg_loc)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
For the first question, there is an ability called "Ord of Lightning (New)" or something :S
Through that you can specify "on-hit" abilities and effect... and also the chance to proc :D

If you use Hellohihi's trigger it can be abused, because units only need to be ordered to attack someone to "trigger the trigger". You'll need a demage detection system for this, or add these two triggers to your map.

This one for adding the events for existing units in the map:
Trigger:
  • Adding Events 1
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area)
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Trigger - Add to (Your_Trigger) the event (Unit - (Picked unit) Takes damage)
      • Custom script: call DestroyGroup(udg_Temp_Group)


And this one to add the events for units entering the map;
Trigger:
  • Adding Events 2
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to (Your_Trigger) the event (Unit - (Triggering unit) Takes damage)


And as a note, you shouldn't have an event on your spell trigger for this :D
But of course you could have conditions to filter out which units will be affected ;)
 

Hellohihi

New Member
Reaction score
42
If you use Hellohihi's trigger it can be abused, because units only need to be ordered to attack someone to "trigger the trigger".

The unit actually needs to be in attack range and the unit must start the attack. (I know you probably know this, i just dont want the topic starter to get confused)

However, yes, it can be abused by spamming the stop command while attacking.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top