Detecting damage of an ability and putting it into the unit's damage?

hellblazer-1

New Member
Reaction score
3
Hey guys...

I'm making my altered melee, and Made an archer, with an ability, called attack.
I gave the archer 0 damage, but the ability he has deals 10 damage, and has a range of 750.

Now, When I play the game, the archers damage shows up a 0, but i want it to show up as the damage that the ability "attack" he has, does.

I've already made it so that he loses mana when he attacks and can't attack once he's run out of mana. Here is my stop attacking trigger ---

Code:
prevent attacking
    Events
        Unit - A unit Is attacked
    Conditions
        ((Unit-type of (Attacking unit)) Equal to Light Archer (upgrade 1)) or (((Unit-type of (Attacking unit)) Equal to Heavy Archer (upgrade 2)) or ((Unit-type of (Attacking unit)) Equal to Crossbowman))
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Mana of (Attacking unit)) Less than or equal to 0.00
            Then - Actions
                Unit - Order (Attacking unit) to Stop
                Player Group - Add (Owner of (Attacking unit)) to ranged_message[1]
                Player Group - Pick every player in ranged_message[1] and do (Game - Display to ranged_message[1] for 10.00 seconds the text: Your Archer / Cross...)
                Player Group - Remove all players from ranged_message[1]
            Else - Actions
                Do nothing

The only thing with that is, it displays the text - run out of arrows every time the archer attempts to attack, and i only want it to display that message once, or whenever the player orders that unit to attack an enemy.

Thanks!!!
 
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