Attack modifier trigger

Exogenesis

New Member
Reaction score
0
So I'm trying to make it so that a summoned unit will deal damage from auto attacks based off of the hero's strength (the hero who summoned the unit).

Trigger:
  • Event
    • Unit - A unit Spawns a summoned unit
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Summoned unit)) Equal to Bear (Level 1)
          • (Unit-type of (Summoned unit)) Equal to Raging Bear (Level 2)
          • (Unit-type of (Summoned unit)) Equal to Spirit Bear (Level 3)
          • (Unit-type of (Summoned unit)) Equal to Soul Bear (Level 4)
          • (Unit-type of (Summoned unit)) Equal to Ancient Bear (Level 5)
    • Actions
      • Unit - Cause (Summoned unit) to damage (Target unit of issued order), dealing ((Real((Strength of (Summoning unit) (Include bonuses)))) x 1.00) damage of attack type Spells and damage type Normal
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
try this...
make a hashtable, then do this:

Trigger:
  • Saving the summoner
    • Events
      • Unit - A unit spawns a summoned unit
    • Conditions
    • Actions
      • Hashtable - Save summoning unit as (whatever you want) of (key (Summoned unit)) in Hashtable_Variable_Name


Trigger:
  • Damage Dealing
    • Event
      • Unit - A unit is attacked
    • Conditions
      • Attacking unit is a summoned unit is equal to true
    • Actions
      • Unit - Cause attacking unit to damage attacked unit for (real(Strength of(Hashtable - Load Unit (Whatever it was in the first trigger) of (Key (Attacking unit))
 

ultimate11

Active Member
Reaction score
25
try this...
make a hashtable, then do this:

Trigger:
  • Saving the summoner
    • Events
      • Unit - A unit spawns a summoned unit
    • Conditions
    • Actions
      • Hashtable - Save summoning unit as (whatever you want) of (key (Summoned unit)) in Hashtable_Variable_Name


Trigger:
  • Damage Dealing
    • Event
      • Unit - A unit is attacked
    • Conditions
      • Attacking unit is a summoned unit is equal to true
    • Actions
      • Unit - Cause attacking unit to damage attacked unit for (real(Strength of(Hashtable - Load Unit (Whatever it was in the first trigger) of (Key (Attacking unit))

Edit : Rewrite
my mistake i didn`t read well
Sry Gfreak but i must to complet your trigger
Trigger:
  • Events
    • A unit die
    • Conditions
      • (triggering unit) unit is a summoned unit is equal to true
    • Actions
      • Hashtable - Clear all child hashtable of (key(triggering unit) in Hashtable_Variable_Name

To prevent leaks :D
 

Exogenesis

New Member
Reaction score
0
try this...
make a hashtable, then do this:

Trigger:
  • Saving the summoner
    • Events
      • Unit - A unit spawns a summoned unit
    • Conditions
    • Actions
      • Hashtable - Save summoning unit as (whatever you want) of (key (Summoned unit)) in Hashtable_Variable_Name


Trigger:
  • Damage Dealing
    • Event
      • Unit - A unit is attacked
    • Conditions
      • Attacking unit is a summoned unit is equal to true
    • Actions
      • Unit - Cause attacking unit to damage attacked unit for (real(Strength of(Hashtable - Load Unit (Whatever it was in the first trigger) of (Key (Attacking unit))

Uhhh... whats a hastable.... and how do you make one.....
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
think of a variable like a string of data, goes in one direction
think of a hashtable like an excell spread sheet
instead of having 1 identifing value or index (x) it has 2 (x,y) so it is 2 dimensional rather than 1
hashtables are also capable of saving any type of data rather than a specified one

you can create one and then just use last created hashtable for every single thing you save, but then you have to make sure nothing is overlapping, if you want to use more than 1, you have to save them to a variable to access them later, create them at map initialization, check the hashtable actions before you ask more, just so u kinda see what im saying
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top