Edit unit attack

LiveSsenkrad

Member
Reaction score
3
Is there a possible way to change a unit's attack ingame, cause i need to use a barrage skill for the unit attack and the barrage's damage=the unit's attack,

it'll be something like this:
Code:
    Events
        Unit - A unit Finishes research
    Conditions
        (Researched tech-type) Equal to Normal Arrows 
    Actions
        Unit - Create 1 Archer for (Owner of (Researching unit)) at (Position of (Researching unit)) facing Default building facing degrees
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Owner of (Researching unit)) Equal to (Owner of (Last created unit))
            Then - Actions
                Unit - Add |cffffcc00N|rormal Attack  to (Last created unit)
                [B]Set Unit attack= 120[/B]
            Else - Actions

Set Unit attack= 120something like that for example
 

PiCkstix

New Member
Reaction score
18
I don't think it's possible...

Though, if you use item abilities to increase its damage it is possible but will show + damage in the units stats.

Unless it's possible in JASS...

Off-toipic:
lol :p
 

UndeadDragon

Super Moderator
Reaction score
447
I don't think that is possibly either :p
 

T.s.e

Wish I was old and a little sentimental
Reaction score
133
If you set the Data - Damage field to 0 on the barrage ability, this trigger can work.

Code:
Barrage Start
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to Barrage
    Actions
        Trigger - Add to Barrage <gen> the event (Unit - (Attacked unit) Takes damage)
Code:
Barrage
    Events
    Conditions
    Actions
        Set BarragePoint = (Position of (Triggering unit))
        Set BarrageGroup = (Units within RANGE of BarragePoint matching (((Owner of (Matching unit)) Not equal to (Owner of (Triggering unit))) and (((Matching unit) is alive) Equal to True)))
        Unit Group - Pick every unit in BarrageGroup and do (Actions)
            Loop - Actions
                Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Damage taken) damage of attack type Spells and damage type Normal
        Custom script:   call DestroyGroup( udg_BarrageGroup)
        Custom script:   call RemoveLocation( udg_BarragePoint)
 

Don

Rise with the Fallens!
Reaction score
52
either you give a lot of proper names or either you remove hero, adn create a new one and ask editor to give another proper name to last created hero!
 

LiveSsenkrad

Member
Reaction score
3
either you give a lot of proper names or either you remove hero, adn create a new one and ask editor to give another proper name to last created hero!
no i want to set the players name = the hero's name

If you set the Data - Damage field to 0 on the barrage ability, this trigger can work.

Code:
Barrage Start
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to Barrage
    Actions
        Trigger - Add to Barrage <gen> the event (Unit - (Attacked unit) Takes damage)
Code:
Barrage
    Events
    Conditions
    Actions
        Set BarragePoint = (Position of (Triggering unit))
        Set BarrageGroup = (Units within RANGE of BarragePoint matching (((Owner of (Matching unit)) Not equal to (Owner of (Triggering unit))) and (((Matching unit) is alive) Equal to True)))
        Unit Group - Pick every unit in BarrageGroup and do (Actions)
            Loop - Actions
                Unit - Cause (Triggering unit) to damage (Picked unit), dealing (Damage taken) damage of attack type Spells and damage type Normal
        Custom script:   call DestroyGroup( udg_BarrageGroup)
        Custom script:   call RemoveLocation( udg_BarragePoint)
thanks! +rep for you!!
 

Don

Rise with the Fallens!
Reaction score
52
Thar ya go then:

Code:
Unit Group - Pick every unit in (Units owned by Player 1 (Red) matching (((Triggering unit) is A Hero) Equal to True)) and do (Actions)
    Loop - Actions
        Player - Set name of Player 1 (Red) to (Name of (Picked unit))
        Leaderboard - Change the label for Player 1 (Red) in game_leaderboard to (Name of (Picked 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