• 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.

Make Make Hero Revive fast If it has Unique item

Level 10
Joined
Mar 1, 2009
Messages
322
we have a fox and a hen across the river type of problem

  • ScourgeLordArmorStart
    • Events
      • Unit - A unit Becomes revivable
    • Conditions
      • ((Revivable Hero) has an item of type Scourge Lord Armor) Equal to True
    • Actions
      • Hero - Make (Owner of (Revivable Hero)) Heroes' revive time rate to be 0.10% of normal rate

this is how it start but there are multiple heroes.... i can change back to 100% easy but how to account for heroes who don't have the item?


  • ScourgeLordArmorFinish
    • Events
      • Unit - A unit Finishes reviving
    • Conditions
      • ((Reviving Hero) has an item of type Scourge Lord Armor) Equal to True
    • Actions
      • Hero - Make (Owner of (Reviving Hero)) Heroes' revive time rate to be 100.00% of normal rate
if i have two heroes that are relivable but only 1 has the item, i don't know how to account for this situation because i want the one with the item to come back faster then those heroes that don't
 
Level 14
Joined
Jan 10, 2023
Messages
248
I'm away from my computer or I would check for myself, but maybe it would be better to (if possible) change the progress of the reviving/unit production once the unit has started reviving?

Check if they have the item on death, then if player begins reviving/training hero, set progress to "x".

Again, I'm not sure if those functions all exist, but I will look at it later today if no one answers this first.
 
Level 10
Joined
Mar 1, 2009
Messages
322
when a hero becomes revivable it is dead

i can make them respawn faster that does work, but i just need help with logic, because there are other heroes that the player might have and that might also be dead(revivable) and if they player chooses to respawn them first it would be like they have the unique armor when they don't. How do i get this trigger to effect the one hero that has the armor.
 
Last edited:
Level 45
Joined
Feb 27, 2007
Messages
5,578
You could transfer control of the hero to some cpu player with increased revive speed, then return it to the player after revival.

There may also be a unit data field (probably integer if I had to guess) that affects hero revival time, which you could try to manually change with the new field natives before the unit begins reviving.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,867
when a hero becomes revivable it is dead

i can make them respawn faster that does work, but i just need help with logic, because there are other heroes that the player might have and that might also be dead(revivable) and if they player chooses to respawn them first it would be like they have the unique armor when they don't. How do i get this trigger to effect the one hero that has the armor.
This works:
  • Revive Starts
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • ((Target unit of issued order) is A Hero) Equal to True
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Altar of Kings
          • (Unit-type of (Triggering unit)) Equal to Altar of Storms
          • // Add more altars as needed or find a better way to identify them //
      • (Issued order) Not equal to (Order(smart))
      • (Issued order) Not equal to (Order(setrally))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of issued order) has an item of type YOUR_ITEM_TYPE) Equal to True
        • Then - Actions
          • Hero - Make (Owner of (Triggering unit)) Heroes' revive time rate to be 10.00% of normal rate
        • Else - Actions
          • Hero - Make (Owner of (Triggering unit)) Heroes' revive time rate to be 100.00% of normal rate
Note that this assumes that a given Player can only have one Altar reviving a hero at a time. No idea if Warcraft 3 even supports multiple Altar revives at once... Maybe hardcode this limitation in your map to avoid the issue?
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,867
no this should work, when a hero is reviving its reserved in a way, it can't be revived in any other way until that alter cancels (this is why revive her instantly didnt work)
I mean what happens when two Altars revive two different Heroes owned by the same Player at the same time. The revive rate is Player based, not Hero based, so adjusting it for one Hero would adjust it for all of their Heroes.

That being said, I THINK Warcraft 3's revive system caches the revive time using the current rate the moment the revive process "begins". So adjusting the rate while a hero is already in the process of reviving would have no effect. Long story short, it may be completely safe or such a rare issue that it's not worth thinking about as it will likely never happen.
 
Level 10
Joined
Mar 1, 2009
Messages
322
SOLVED
Thanx again uncle

  • DeathLordArmor
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Target unit of issued order) is A Hero) Equal to True
          • (Issued order) Not equal to (Order(smart))
          • (Issued order) Not equal to (Order(setrally))
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Triggering unit)) Equal to Altar of Kings
              • (Unit-type of (Triggering unit)) Equal to Altar of Kings (elven)
              • (Unit-type of (Triggering unit)) Equal to Altar of Kings (Dwarven)
              • (Unit-type of (Triggering unit)) Equal to Altar of The Dark Iorn Clan (Dark Iorn)
              • (Unit-type of (Triggering unit)) Equal to Altar of Queens
              • (Unit-type of (Triggering unit)) Equal to Altar of Blood (blood elf)
              • (Unit-type of (Triggering unit)) Equal to Altar of Storms
              • (Unit-type of (Triggering unit)) Equal to Altar of Kalindor (kalindorn)
              • (Unit-type of (Triggering unit)) Equal to Altar of Nor (north)
              • (Unit-type of (Triggering unit)) Equal to Altar of the Fel (Mo'arg)
              • (Unit-type of (Triggering unit)) Equal to Altar of the Legion
              • (Unit-type of (Triggering unit)) Equal to Altar of the Loa (Tribunal)
              • (Unit-type of (Triggering unit)) Equal to Altar of the Lost Tribes
              • (Unit-type of (Triggering unit)) Equal to Altar of the Shadow Council (FelOrc)
              • (Unit-type of (Triggering unit)) Equal to Altar of the Twisted Nether (Ravanger)
              • (Unit-type of (Triggering unit)) Equal to Altar of Draenor (Heavens)
              • (Unit-type of (Triggering unit)) Equal to Altar of Forrunners (Guardian)
              • (Unit-type of (Triggering unit)) Equal to Altar of Flood (flood)
              • (Unit-type of (Triggering unit)) Equal to Altar of the Corrupted
              • (Unit-type of (Triggering unit)) Equal to Pools of Evolution (zerg)
              • (Unit-type of (Triggering unit)) Equal to Altar of Elders
              • (Unit-type of (Triggering unit)) Equal to Hallowed Alter (covenant)
              • (Unit-type of (Triggering unit)) Equal to Altar (Protoss NoPower)
              • (Unit-type of (Triggering unit)) Equal to Altar of Aiur (Protoss Khalai)
              • (Unit-type of (Triggering unit)) Equal to Altar of Cybros (Protoss Purifier)
              • (Unit-type of (Triggering unit)) Equal to Altar of Shakuras (Protoss Nerazim)
              • (Unit-type of (Triggering unit)) Equal to Altar of Slayn (Protoss Tal'darim)
              • (Unit-type of (Triggering unit)) Equal to Altar of Nerub
              • (Unit-type of (Triggering unit)) Equal to Altar of Darkness
              • (Unit-type of (Triggering unit)) Equal to Altar of the Depths
              • (Unit-type of (Triggering unit)) Equal to Altar of the Aspects (Bronze Dragon)
              • (Unit-type of (Triggering unit)) Equal to Altar of the Aspects (Dragon)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of issued order) has an item of type Deaths' Shroud) Equal to True
        • Then - Actions
          • Hero - Make (Owner of (Target unit of issued order)) Heroes' revive time rate to be 0.10% of normal rate
        • Else - Actions
          • Hero - Make (Owner of (Target unit of issued order)) Heroes' revive time rate to be 100.00% of normal rate
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,867
No problem, but that's a lot of Altars!

If you want to optimize it, it'd be better to just check for something like this:
  • (Level of SOME_HIDDEN_ABILITY for (Triggering unit)) Equal to 1
So you would add a hidden ability to all of your Altars in the Object Editor. I use Storm Hammers as my go to ability since it doesn't cause any issues. This acts like a pseudo-classification to find specific types of units. Much better than asking 30 different questions.


Also, you can delete this Condition:
  • And - All (Conditions) are true
It doesn't do anything here. Conditions have to all be true by default. You should rarely if not ever need to use this.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,867
i see what you mean about the and condition
about storm hammers ability does that show in ui?
Yes, it does show in the UI by default, but you can hide any ability by setting it's Art - Button Position - X, Y to 0, -11.

Hold shift when opening the field to enter negative values.
 
Top