Spiked Carapace trigger help

Exogenesis

New Member
Reaction score
0
Trigger:
  • Event
    • Unit - A unit Learns a skill
    • Condition
      • (Learned Hero Skill) Equal to Spiked Carapace
    • Actions
      • Unit - Cause (Damage source) to damage (Attacking unit), dealing ((Real((Strength of (Triggering unit) (Include bonuses)))) x 20.00) damage of attack type Spells and damage type Normal


I'm trying to make it so that units who attack the hero will get damaged based off the hero's strength.
I know this isn't probably close but I've tried many things....
help?
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
There would be no Damage source or Attacking unit with that event. You would need to do something like this:
Trigger:
  • Trigger
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Spiked Carapace for (Attacked unit)) Greater than 0
    • Actions
      • Unit - Cause (Attacked unit) to damage (Attacking unit), dealing ((Real((Strength of (Attacked unit) (Include bonuses)))) x 20.00) damage of attack type Spells and damage type Normal
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
There would be no Damage source or Attacking unit with that event. You would need to do something like this:
Trigger:
  • Trigger
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of Spiked Carapace for (Attacked unit)) Greater than 0
    • Actions
      • Unit - Cause (Attacked unit) to damage (Attacking unit), dealing ((Real((Strength of (Attacked unit) (Include bonuses)))) x 20.00) damage of attack type Spells and damage type Normal
This is wrong as well, it would "work" but players might glitch the system.
Why is that? Because the event "a unit is attacked" doesnt fire when the damage is dealt but before. Whenever a unit tries to attack an opponent the event will already fire even if the unit doesnt really attack (because its getting stunned, killed, or is issued a stop order, before the actual attack happens).

If you want it to work perfectly you would need a damage detection system. You can download various different such systems in the turtorials and resources sub-forum.
 

inevit4ble

Well-Known Member
Reaction score
38
you could do this
Trigger:
  • Skill Learning
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Spiked Carapace
    • Actions
      • Trigger - Add to Return Damage <gen> the event (Unit - (Triggering unit) Takes damage)

Trigger:
  • Return Damage
    • Events
    • Conditions
    • Actions
      • Set Damage = ((Strength of (Triggering unit) (Include bonuses)) x 20)
      • Unit - Cause (Triggering unit) to damage (Damage source), dealing (Real(Damage)) damage of attack type Spells and damage type Normal
 

ultimate11

Active Member
Reaction score
25
But Accname maybe this is what he want...
Trigger:
  • Trigger - Add to Return Damage <gen> the event (Unit - (Triggering unit) Takes damage)
and this is wrong as well.
this will fire up the event event if you are not attacked.This will work for spells too.It`s bad.
 

Smitty

Member
Reaction score
20
It's still better than what he had before. And it's very difficult to detect a unit actually taking damage from an attack.
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
not really, check out weeps dds, i myself made a dds thats pure gui that passes leak checks
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
that depends, if a spell is triggered or if you use a dtds (dmg type detection system) you can rule out magic damage
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
at that point it gets down to the op or map creator to choose whether they are willing to put in the work and whether it is worth the deviation of precision
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
It wouldn't work because the attack happens before the damage happens... the attack fires then over a period of time the attack missle moves to the unit and deals damage on impact... even melee have a small time between the attack and the damage, their attack distance is simply below or equal to about 100 range
 

Exogenesis

New Member
Reaction score
0
you could do this
Trigger:
  • Skill Learning
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Spiked Carapace
    • Actions
      • Trigger - Add to Return Damage <gen> the event (Unit - (Triggering unit) Takes damage)

Trigger:
  • Return Damage
    • Events
    • Conditions
    • Actions
      • Set Damage = ((Strength of (Triggering unit) (Include bonuses)) x 20)
      • Unit - Cause (Triggering unit) to damage (Damage source), dealing (Real(Damage)) damage of attack type Spells and damage type Normal

How did you do the "set damage" thing? I can't find it anywhere
 
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