Changing unit's attack, armor... with triggers

Vunjo

New Member
Reaction score
1
Is it possible to change attack, attack speed, armor or anything like that with triggers. I want to make a spell that summons a unit, and a summoned unit has for example 500 + 10x Intelligence of casting unit.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, not directly...

You will need to use abilities to achieve this, but there are vJass systems out there, which will do this for you, like Status, by Jesus4Lyf, which is used like this (Attack is used in this example ;)):
Trigger:
  • Custom script: call Status[ GetTriggerUnit() ].modDamageBonus( 100 )


This will give 100 extra damage to (Triggering unit) ;)
 

sentrywiz

New Member
Reaction score
25
Or use Tome of Something :p

Too bad Blizzard didn't make Tomes for everything, that would of been better
 

Vunjo

New Member
Reaction score
1
Well, not directly...

You will need to use abilities to achieve this, but there are vJass systems out there, which will do this for you, like Status, by Jesus4Lyf, which is used like this (Attack is used in this example ;)):
Trigger:
  • Custom script: call Status[ GetTriggerUnit() ].modDamageBonus( 100 )


This will give 100 extra damage to (Triggering unit) ;)

Thanks! But how should i change it to give bonus damage based on x Intelligence of casting unit?? I have text and maps about it now, so i know how to change other things li attack speed and armor, but i don't have the fatest how to change number to be based on Stats of Hero ( casting unit )
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Trigger:
  • Custom script: call Status[ GetTriggerUnit() ].modDamageBonus( 500 + GetHeroInt( GetTriggerUnit() ) * 10 )


That should be it ;)
 

Laiev

Hey Listen!!
Reaction score
188
EDIT: komaqtion already do it :x anyway..

PS koma, you forget the include bonus :p
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
he meant that you can get the heroes int with bonuses (like attribute bonus, or item bonus, or whatever, basically everything displayed with green text in the interface) or without bonuses, the pure int of the hero.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Oh, the syntax of [ljass]GetHeroInt()[/ljass] ? XD

Yeah, then use this instead:
Trigger:
  • Custom script: call Status[ GetTriggerUnit() ].modDamageBonus( 500 + GetHeroInt( GetTriggerUnit(), true ) * 10 )
 

Vunjo

New Member
Reaction score
1
Oh, the syntax of [ljass]GetHeroInt()[/ljass] ? XD

Yeah, then use this instead:
Trigger:
  • Custom script: call Status[ GetTriggerUnit() ].modDamageBonus( 500 + GetHeroInt( GetTriggerUnit(), true ) * 10 )

This should give to triggering unit (500 + 10xIntelligence) damage right?
And this TriggerUnit, can i change to EnterUnit and those things, like i think i will need SummonedUnit
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Yeah, it'll give the unit that amount ;)

And GetTriggerUnit() is the same as (Triggering unit), and this can be used for every event there is, instead of (Casting unit) or (Entering unit) or (Dying unit)...
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top