• 🏆 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!

upgrade units

Status
Not open for further replies.
Level 20
Joined
Feb 27, 2019
Messages
592
Does any of these events exist?
Player 1 red property lumber becomes equal to 1?
Or
Player 1 red gains lumber
Set research Hp & Dmg of (Triggering player) to current research level of HP & Dmg + 1
 
Level 20
Joined
Feb 27, 2019
Messages
592
To get the function you desribed then

Event
Player 1 red property becomes equal to 1
Player 2 blue property becomes equal to 1
...
Action
Set research Hp & Dmg of (Triggering player) to current research level of HP & Dmg + 1

That will increase the level of the research each time exactly 1 lumber is gained and only if the player has 0 lumber before.

It may become a lot of upgrades though. Too many levels of upgrades is not good.

You can create a research in the upgrades section in the object editor. The upgrade needs to be added to the unit in the unit section in object editor.

Is this the trigger you wanted?

Is a player only able to gain 1 lumber at a time?

How many levels of the upgrades do you plan on using?
 
Level 20
Joined
Feb 27, 2019
Messages
592
Then you can use the trigger i posted.

Create the upgrades you want, add them to the units, set level of upgrades to +1 each time lumber is collected for the player that should have the upgrades.

To add creeps to spawn you could use a loop and an integer variable or just an integer variable.

If you use only an integer variable set it to + 1 each time lumber is collected and on the trigger where the creeps spawn do Create Integer_Variable footman at x facing x
The Integer_Variable is a number so it will create as many footman as the number in the variable.

The Integer_Variable needs to be set to a value because the default value is 0.

For loop its:
For each Integer A from 1 to Integer_Variable
Create 1 footman at x facing x
 
Level 20
Joined
Feb 27, 2019
Messages
592
I can't find a trigger for Edit Unit dmg, hp, armor and change name
Is there such a thing?
The easiest way is to use upgrades.

Create the upgrades you want, add them to the units, set level of upgrades to +1 each time lumber is collected for the player that should have the upgrades.

These exist but may or may not exist on your version of the editor:
  • Unit - Set Base Damage of No unit to 10 for weapon index: 0
  • Unit - Set Name of No unit to Hello
  • Unit - Set Armor of No unit to 0.00
  • Unit - Set Unit: No unit's Real Field: Hit Points ('uhpc') to Value: 300.00
and they would only affect the units currently on the map. If you spawn in more units they have to be changed aswell. Using a variable to store the information would be wanted. However I think using upgrades is much easier.
 
Last edited:
Status
Not open for further replies.
Top