non-hero leveling

dondonda

New Member
Reaction score
3
hey guys! what i am trying to create is a system where every time a non-hero unit kills an enemy unit, the killing unit gains 1 Damage to its base and 10 hp to its base. I really need a trigger to help me with this system and i dont need unit ranks included (private,major..etc).
thanks in advance!
 

darkbeer

Beer is Good!
Reaction score
84
Make an ability based of the item ability of claws of attack with about 1000 lvls or sth like that, then whenever the unit kills another increase its level by 1.

hm i dont think that this works with life bonus abilities, but you can try it :p
 

dondonda

New Member
Reaction score
3
Make an ability based of the item ability of claws of attack with about 1000 lvls or sth like that, then whenever the unit kills another increase its level by 1.

hm i dont think that this works with life bonus abilities, but you can try it :p

Yeah i think i could use then try to do the same with gem of health. Although i am pretty new to JASS/trigger writing so how could you write a a trigger so the level goes up according to the amount of units killed.
 

Slapshot136

Divide et impera
Reaction score
471
Code:
event - a unit is dies
conditions - killing unit is an enemy of dying unit
actions - 
set level of (attack spell) to (level of attack spell + 1) for killing unit
set level of (hp spell) to (level of hp spell + 1) for killing unit

something like that
 

dondonda

New Member
Reaction score
3
Code:
event - a unit is dies
conditions - killing unit is an enemy of dying unit
actions - 
set level of (attack spell) to (level of attack spell + 1) for killing unit
set level of (hp spell) to (level of hp spell + 1) for killing unit

something like that

I tested out this trigger by adding the abilities to a unit but i have encountered a serious glitch!:banghead: Whenever i try to train the unit with the abilities the whole warcraft program shuts down sending me a message that i have encountered a Fatal Error involving Warcraft III Frozen Throne. I dont know what the problem is but can some pleaaase help me!! is there something missing in the trigger?!?
 

vypur85

Hibernate
Reaction score
803
I think you can't set item ability levels (not so sure about this, some can set while some cannot). So, you just need to add the abilities one by one instead of giving the abilities different levels. Hope I'm right (trying it now). :)
 

Ghostwind

o________o
Reaction score
172
Triggers would definitely lag less than a custom ability with 1000 levels. Probably under unit - set property. Not sure if you can do it with damage, though. They do it in RP maps ;P

I think you can't set item ability levels

Then make it a unit ability (it can be done in object editor, just untick the box "item ability")
The fact that it is an item ability given to units is also probably what is making it crash.
 

vypur85

Hibernate
Reaction score
803
Then make it a unit ability (it can be done in object editor, just untick the box "item ability")
The fact that it is an item ability given to units is also probably what is making it crash.
Yeah I know that. What I meant was some item abilities can't be leveled up. Even if you level up, the effect is not there.

Not sure about the upgrades. Upgrades work for players right? Not single units? Not sure. Have not used it before. :p

>So, you just need to add the abilities one by one instead of giving the abilities different levels. Hope I'm right (trying it now).
It doesn't work :p.
 

dondonda

New Member
Reaction score
3
Yeah, i tried using the unit ability Engineering Upgrade and instead of using triggers to level up the ability i tried setting it equal to the custom value of the unit and raising the custom value per kill. It didn't work.:mad: My Warcraft Window still shutsdown. I even tried adding the ability to a unit once it kills another enemy unit but still had same the reoccurring problem. Can someone please test this out and a solution! It would be a great help!

and for the upgrade thing, i need it for single units not entire player groups, and i dont really want to make separate upgrades for every unit in my map.:p
thanks anyways
 

vypur85

Hibernate
Reaction score
803
Code:
Untitled Trigger 001
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Killing unit)) Equal to Footman
    Actions
        Unit - Add Inventory (Hero) to (Killing unit)
        Hero - Create Manual of Health and give it to (Killing unit)
        Hero - Order (Killing unit) to use (Last created item)
        Unit - Remove Inventory (Hero) from (Killing unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Item Damage Bonus (+1) for (Killing unit)) Equal to 0
            Then - Actions
                Unit - Add Item Damage Bonus (+1) to (Killing unit)
            Else - Actions
                Unit - Increase level of Item Damage Bonus (+1) for (Killing unit)
Tested it. This works :). In terms of the adding damage, the item ability must have many levels, which is not so efficient. (Unless there is a limit in the damage incremennt). I mean, if a unit kills 1000 units, then the damage becomes 1000. So you'll need at least 1000 levels =.=.
 

dondonda

New Member
Reaction score
3
Hey well ive ran into another problem with this trigger.:banghead:
heres what i got but i am trying to make it so that if any player owned unit (red for ex.) kills any other given player unit (ex. blue) that the trigger will still work. Right now this trigger only works if a unit kills a Neutral Hostile or Player owned unit that already placed on the map using WE.

Battle Valor
Events
Unit - A unit Dies
Conditions
((Owner of (Killing unit)) controller) Not equal to ((Owner of (Dying unit)) controller)
((Killing unit) is A structure) Equal to False
((Killing unit) is Mechanical) Equal to False
((Dying unit) is A structure) Equal to False
Actions
Unit - Add Battle Experience (Buffed) to (Killing unit)
Unit - Add Inventory (Hero) to (Killing unit)
Hero - Create Manual of Health and give it to (Killing unit)
Hero - Order (Killing unit) to use (Last created item)
Hero - Create Tome of Damage and give it to (Killing unit)
Hero - Order (Killing unit) to use (Last created item)
Unit - Remove Inventory (Hero) from (Killing unit)
 
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