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

[Solved] Revive Heroes in a different Building instead of the Altar

Status
Not open for further replies.
Level 3
Joined
Dec 25, 2016
Messages
39
Hello,

Im making a map where you summon Heroes but they are controlled by AI (the concept of Majesty for those who know the game).

This is the issue:
I have a building that summons a Hero, but the Hero will be controlled by a computer. I have some options:
-Once the Hero is summoned, change its owner to the according Computer player
-Make a dummy Unit to issue the order of summoning the Hero, and do it all with triggers.

When a Hero is Slain, players will have a cementery avialable to build, where you can revive all "your" (remember, they will actually belong to a Computer) Heroes.

So there are 2 issues:
1) How to make Slain Heroes be available to revive in a different building than the one they were summoned on
2) How to make Slain Heroes owned by Player B, be revived by Player A

I pretty dominate World Editor GUI triggers interface.

Thanks!
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
I assume the cemetery belongs to a Human Player, so the heroes being revived from it belong to the same Human Player too.
Let's pass one by one, for your second issue, just use these triggers to change the owner once the hero is revived :
  • Revived Heroes Captor
    • Events
      • Unit - A unit owned by (The human Player) Finishes reviving //You can repeat this event as many times as the number of players inside
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Unit - Change ownership of (Triggering unit) to "Your Computer Player" and Change color

For the first issue did you try setting priority of summoning (reviving) of the cemetery more than the original summoning building ? It should be found in Object Editor.

If you didn't find such, answer my question, is the maximum number of that one hero type one ? In other words, we don't find two heroes of the same type ?
 
Level 3
Joined
Dec 25, 2016
Messages
39
Just solved it. There is an option in the object editor that says "Techtree - Revives Dead Heroes" :confused: I just turned it to False on the Altar and True on the Cementery :cool:

Yeah it was actually no trouble just changing the owner to the computer when a Heroe spawns and changing back the owner to the User Player when it dies :D

Thank you very much!
 
Status
Not open for further replies.
Top