• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Healing reduction ability

Status
Not open for further replies.
Level 3
Joined
Aug 1, 2021
Messages
11
Hello everyone!
I made an passive unit ability (called X) based on the "Item attack heal reduction bonus" ability and it require an upgrade to be avaiable.
When I tested it, the ability (X) already be avaiable on a unit although I hadn't research an appropriate upgrade. Also no passive icon was shown in command button of the unit.
I only have trouble with this ability, the rest work properly.
Please help me and thanks in advance!
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,872
Does it have Techtree - Check Dependencies checked on? That tells the ability that it has requirements.

If that still doesn't work then you can use a second ability, let's say Storm Hammers for example, to act as the Icon in the command card.
You can then use triggers to Disable X for each player and then Enable X for the player when the upgrade is researched.

  • Disable X
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Disable X for (Picked player)
  • Enable X
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to X Upgrade
    • Actions
      • Player - Enable X for (Owner of (Triggering unit))

That should work. However, if the X ability still functions even while disabled, you can try an approach where you manually Add the X ability to the unit(s) instead of giving it to them by default in the Object Editor. You'd want to do this when the units "Enter the map" and when the "Research finishes".

I'm writing these triggers from memory but it would look something like this:
  • Events:
    • Unit - A unit enters the playable map area
  • Conditions:
    • Unit-type of Triggering unit Equal to YourUnit
    • Level of X Upgrade for (Owner of Triggering unit) Greater than or equal to 1
  • Actions:
    • Unit - Add X to Triggering unit
  • Events
    • Unit - A unit Finishes research
  • Conditions
    • (Researched tech-type) Equal to X Upgrade
  • Actions
    • Unit Group - Pick every unit in (Units owned by Owner of Triggering unit of type YourUnit) and do:
      • Unit - Add X to Picked unit
 
Last edited:
Level 3
Joined
Aug 1, 2021
Messages
11
Does it have Techtree - Check Dependencies checked on? That tells the ability that it has requirements.

If that still doesn't work then you can use a second ability, let's say Storm Hammers for example, to act as the Icon in the command card.
You can then use triggers to Disable X for each player and then Enable X for the player when the upgrade is researched.

  • Disable X
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Player - Disable X for (Picked player)
  • Enable X
    • Events
      • Unit - A unit Finishes research
    • Conditions
      • (Researched tech-type) Equal to X Upgrade
    • Actions
      • Player - Enable X for (Owner of (Triggering unit))

That should work. However, if the X ability still functions even while disabled, you can try an approach where you manually Add the X ability to the unit(s) instead of giving it to them by default in the Object Editor. You'd want to do this when the units "Enter the map" and when the "Research finishes".

I'm writing these triggers from memory but it would look something like this:
  • Events:
    • Unit - A unit enters the playable map area
  • Conditions:
    • Unit-type of Triggering unit Equal to YourUnit
    • Level of X Upgrade for (Owner of Triggering unit) Greater than or equal to 1
  • Actions:
    • Unit - Add X to Triggering unit
  • Events
    • Unit - A unit Finishes research
  • Conditions
    • (Researched tech-type) Equal to X Upgrade
  • Actions
    • Unit Group - Pick every unit in (Units owned by Owner of Triggering unit of type YourUnit) and do:
      • Unit - Add X to Picked unit
I did have Techtree - Check Dependencies checked. I tried your Disable/enable method. They didnt work.
But the last one Add ability to unit which work exactly what I want. This ability is so weird!!!

You just help me solve the problem. Thanks a lot!!!
 
Status
Not open for further replies.
Top