• 🏆 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/ability that checks food amount available ?

Status
Not open for further replies.
Level 29
Joined
Mar 9, 2012
Messages
1,557
Want to do something like this:
For each 1 food capacity of that player all of his troops gain a percent amount of their maximum HP. On 30/50/70 capacity all of them get one level of damage and armor upgrade. There are exceptions like heroes, casters, certain mechanicals.
My expectation is that ill probably need a 100lvl upgrade, an rune ability pointing to another 3lvl upgrade where ill set it to prequisite 30/50/70 of the first with the damage and armor, and an info dummy passive to display the tooltip on units.
However have no idea how to connect it with food amount available.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
However have no idea how to connect it with food amount available.

First you need a system like my item and unit cost system. Mine is on the hive or in my sig below.

Use the events unit enters / unit leaves map.

Then get the good cost using my system. Check to see if it increases (greater than 0)

If it does increase your units stats. In the then block decrease your units stats.

You should also look how bonus systems work. They use one item to increase health / damage without a ton of levels.
 
Status
Not open for further replies.
Top