• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Changing level of non-hero units via trigger

Status
Not open for further replies.
Level 8
Joined
Feb 20, 2007
Messages
338
Is it possible to set the level of a nonhero unit to anything I desire?

EXAMPLE creating a level one spider and changing its level to 5, 10, 20, whatever via a trigger?

I know I can set the level of a hero unit via
  • Hero - Set (Last created unit) Hero-level to 20, Hide level-up graphics
Is there a similar command for non-hero units?
 
Level 4
Joined
Mar 19, 2008
Messages
89
Unfortunately I don't think there is, but one idea is give this unit the hero ability, then I think it should be able to level up with that trigger.
Sorry if this doesn't help!
 
Level 8
Joined
Feb 20, 2007
Messages
338
The level of unit has only one meaning: it determines amount of XP you get for killing it. So even if you changed it, it won't make the unit stronger.
If you want units to "level up", just create 5 versions of that unit, one for each level, and then use "replace unit"

You must understand that there are 272 neutral hostile units (default). Further my hero will reach level 50, each 'round' per level will be between 4-5 'waves' of random creeps ranging from 1 creep to 25, each creep created per wave is a random creep.

At least that is what I want. I most likely will have to go through and modify 200 units to reach level 50 strength, hp etc.
 
Level 11
Joined
Nov 15, 2007
Messages
781
If you want all units to get more powerful over time, make some researches with a constantly increasing research level that effects the units in question.

Else you can add abilities based on Item Health Bonus, Item Damage Bonus, Item Attackspeed Bonus, Item Armor Bonus, etc. upon unit spawn.

If you want them to give more experience, you could make a trigger that grants experience to the hero that kills the unit based on the unit's hitpoints, or even one to distribute it evenly to heroes in the area around the unit when it dies.

But as for levels, unit level can only be changed in the object editor. If you need help with any of the above just ask.
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
Else you can add abilities based on Item Health Bonus, Item Damage Bonus, Item Attackspeed Bonus, Item Armor Bonus, etc. upon unit spawn.

Item Health Bonus and Item Mana Bonus can't be leveled! Increasing it's level will not add any more health or mana, which you can use to permanentely increase the unit's health:
Just create ability that adds 101 HP on first level and 1 HP on second level. When you add it to unit, it will gain 101 HP. Then set the level to 2 and remove it, which will decrease the unit's Hp by 1 (that's the bonus for second ability level). Then, the unit has it's abilities unchanged, but it has 100 more HP.
 
Level 11
Joined
Nov 15, 2007
Messages
781
Interesting. I never really used those to increase a unit's power, so I had no idea about that mechanic. Does the same apply to any other item bonus abilities? A bit off topic but it might help the guy with his problem anyway.
 
Level 8
Joined
Feb 20, 2007
Messages
338
So the answer is no, I can not change the level of a nonhero unit via a trigger.

You all did give me a few ideas on how to change exp gained, life, mana, power, blah though. Thanks.
 
Status
Not open for further replies.
Top