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

Hero with a Hero Pet summon/resurrection ability.

Status
Not open for further replies.
Level 6
Joined
Aug 25, 2019
Messages
92
So, I want a hero, who has a skill, that summons him a Pet, which incidentally also would be a Hero. But I would want it to be initially summonable from the Hero, and when it dies, I would want it to be summoned again from the Hero and with the abilities and levels it has already earned. Sort of like Rexxar and Misha, except Misha would have Hero levels and be raised from Rexxar, when she died, effectively making him an Altar of some sort, but only for Misha, if you follow?

I guess I'm unsure as how to set it up, and I was wondering how you people would go about it with just altering abilities or using triggers?

Edit: Oh, I use version 1.27b.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
You'll have to go into greater detail about how you want it to work.

I assume you want this:

You want 2 abilities on your hero, Summon Pet and Revive Pet.

Summon Pet is learnable and would use triggers to detect the first time you cast it, Creating a new Pet hero for the player. Now this leads to some questions. What happens if the player casts the Summon Pet ability again? We obviously don't want to Create a new Pet hero since that'll increase our total Pet count by 1, so what does it do?

Revive Pet would use triggers to revive the Pet hero, pretty simple. This ability would be added to the Hero after their first cast of Summon Pet or possibly when they Learn the skill for the first time. In order for the ability to remain on our Hero after it dies you would need to use a special function to make it permanent:
  • Custom script: call UnitMakeAbilityPermanent(whichUnit, true, abilityId)
I suppose you'd want this ability to be disabled (unclickable but still readable) while the pet is still alive.
To do that it would go like this:
  • Upon adding the ability to the Hero disable it.
  • Pet dies -> enable ability.
  • Revive Pet is used -> disable ability.
 
Last edited:
Level 16
Joined
Mar 27, 2011
Messages
1,349
If you create a hero, then revive him after death, shouldn't all abilities be remembered?

I had some spare time so I've create a demo map on one way you can make a hero pet. There are many different approaches you could take, but this is how I did it.


  • Summon Hero Bear
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Summon Hero Bear
    • Actions
      • -------- Set the position of the Bear. --------
      • -------- We use varaibles to avoid creating leaks --------
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Set VariableSet TempPoint2 = (TempPoint offset by 150.00 towards (Facing of (Triggering unit)) degrees.)
      • -------- Check if the Bear has been summoned before. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroBear_Pet[(Player number of (Owner of (Triggering unit)))] Equal to No unit
        • Then - Actions
          • -------- If Bear hasn't been summoned before, create one. --------
          • Unit - Create 1 Yogi for (Owner of (Triggering unit)) at TempPoint2 facing Default building facing degrees
          • -------- Save the Bear into a variable so we can remember it later. --------
          • Set VariableSet HeroBear_Pet[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
        • Else - Actions
          • -------- Else if Bear already been summoned before - Check if the Bear is alive. --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (HeroBear_Pet[(Player number of (Owner of (Triggering unit)))] is alive) Equal to True
            • Then - Actions
              • -------- If Bear is already alive, we will send a message to the player and reset the cooldown of the summon ability. --------
              • Game - Display to (Player group((Owner of (Triggering unit)))) for 5.00 seconds the text: Your Pet is already...
              • -------- Remember that the Bear was cast improperly so our other trigger can reset the hero's cooldown. --------
              • Set VariableSet HeroBear_Pet_AlreadyAlive[(Player number of (Owner of (Triggering unit)))] = True
            • Else - Actions
              • -------- Else if the bear is not alive (dead) - Let's revive the bear at the desired point. --------
              • Hero - Instantly revive HeroBear_Pet[(Player number of (Owner of (Triggering unit)))] at TempPoint2, Hide revival graphics
      • -------- Clean up our Point (location) leaks --------
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Custom script: call RemoveLocation (udg_TempPoint2)
  • Summon Hero Bear Reset
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • HeroBear_Pet_AlreadyAlive[(Player number of (Owner of (Triggering unit)))] Equal to True
    • Actions
      • Set VariableSet HeroBear_Pet_AlreadyAlive[(Player number of (Owner of (Triggering unit)))] = False
      • Unit - For Unit (Triggering unit), end cooldown of ability Summon Hero Bear


  • The ability is based off the special "Channel" ability. If you're unfamiliar with "Channel", here is a tutorial:
  • If you're unfamiliar about the concept of "leaks", read this tutorial:
  • The trigger I made is MPI (Multi-player Instancability), not MUI (Multi-Unit Instancability). This means the trigger won't work properly if the same player has multiple Rexxars (each with this ability) or if the one Rexxar has multiple Summon Hero Pet abilities using the same trigger. Each player can have 1 instance of this going.
    MUI may be a little advanced to discuss here. There are some good tutorials if you need this ability/trigger to be MUI.
 

Attachments

  • Hero Summon Demo.w3m
    19.1 KB · Views: 14
Level 33
Joined
Mar 27, 2008
Messages
8,035
Here's my take on this.

Attached a test map.

Play around with the test map and see if there's anything you would like to be changed.

Press ESC key to kill Misha (you need to summon her first, though, duhh)
 

Attachments

  • Summon Misha (Hero).w3m
    12.9 KB · Views: 17

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
If you create a hero, then revive him after death, shouldn't all abilities be remembered?
I assumed that wasn't the case because the ability wasn't learned from the Hero Skill Menu. But now that I think about it, this "Make Permanent" function may only exist to retain abilities through Morphing effects such as Metamorphosis.
 
Level 6
Joined
Aug 25, 2019
Messages
92
Ah, screw it. It seems to be too much bother to get it to work as I want it to. I suppose I'll just settle for a Pet which scales with ability levels, like Misha or Carrion Beetles ordinarily do. Either that, ot have a Hero Pet companion same as an ordinary Hero and revive it at the usual places for dead heroes.

I did think of having the death of the main Hero be a game ending event, whereas the Pet could have a Reincarnation skill with a very low cooldown and an exceedingly long casting time, to illustrate that the death of a Pet would disable it from play for, say, 5 minutes or whatever, after which it came back to life in the exact spot, where it died. Or something.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
Ah, screw it. It seems to be too much bother to get it to work as I want it to. I suppose I'll just settle for a Pet which scales with ability levels, like Misha or Carrion Beetles ordinarily do. Either that, ot have a Hero Pet companion same as an ordinary Hero and revive it at the usual places for dead heroes.

I did think of having the death of the main Hero be a game ending event, whereas the Pet could have a Reincarnation skill with a very low cooldown and an exceedingly long casting time, to illustrate that the death of a Pet would disable it from play for, say, 5 minutes or whatever, after which it came back to life in the exact spot, where it died. Or something.
Well, if you explain exactly what you want then I'm sure one of us can make it for you. It's only a few simple triggers for the most part, it just depends on how you want it to work.
 
Level 6
Joined
Aug 25, 2019
Messages
92
Well, if you explain exactly what you want then I'm sure one of us can make it for you. It's only a few simple triggers for the most part, it just depends on how you want it to work.
Well, I wanted it to work exactly as I described it in the intro. I don't really know how else to put it. A Hero who can summon a Hero Pet with one of his Hero abilities, and after that revive the same Pet with its levels and abilities intact, if it dies. Same as any kind of Altar or Tavern.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,535
So the hero revives the pet like an altar with the unit queue/gold bar? That's not possible for non-buildings as far as I know.

Do you want an ability that Revives the pet? What happens when you level up the Summon Pet ability? Does it update the current living pet automatically or do you need to re-cast it to update it? There's a lot of details that go into this that can change how it's designed.
 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
Well, I wanted it to work exactly as I described it in the intro. I don't really know how else to put it. A Hero who can summon a Hero Pet with one of his Hero abilities, and after that revive the same Pet with its levels and abilities intact, if it dies. Same as any kind of Altar or Tavern.
Did you check my test map ?

The Hero "acts" as an Altar already, "reviving" the dead Misha if it has already existed (and died currently) for that Rexxar.

Else (if Misha has never existed yet for that Rexxar), create a new Misha (Hero) for that Rexxar.

My test map does all this;
  • A Hero who can summon a Hero Pet with one of his Hero abilities
  • revive the same Pet with its levels and abilities intact, if it dies (casted by the Rexxar owner)
  • Same as any kind of Altar or Tavern (Rexxar is able to revive dead Misha using Triggers - or you prefer the old-fashioned revive where it has the progress bar of an Altar?)
 
Last edited:
Level 16
Joined
Mar 27, 2011
Messages
1,349
Ah, screw it. It seems to be too much bother to get it to work as I want it to. I suppose I'll just settle for a Pet which scales with ability levels, like Misha or Carrion Beetles ordinarily do. Either that, ot have a Hero Pet companion same as an ordinary Hero and revive it at the usual places for dead heroes.

I did think of having the death of the main Hero be a game ending event, whereas the Pet could have a Reincarnation skill with a very low cooldown and an exceedingly long casting time, to illustrate that the death of a Pet would disable it from play for, say, 5 minutes or whatever, after which it came back to life in the exact spot, where it died. Or something.

Yikes, that's a little upsetting to hear considering two people gave you two different approaches to do what you want. You just have to copy and paste the abilities and triggers for the most part.

As Uncle mentioned, you need to give us a little more detail if the two solutions already provided don't match what you're looking for.

Uncle's question: Do you intend the hero to have a timed progress (gold) bar for reviving the pet instead of an instant revival?


Did you check my test map ?

...


...yeah did you? What needs to change to meet your idea?
 
Level 19
Joined
Feb 27, 2019
Messages
590
How do you imagine your ability to function?

Works as a regular summon ability, only costs mana?
Costs gold/lumber?
Has revive time?

First one youve already got.
The second is a bit harder if not near or impossible.
The third is not that hard unless in combination with the first.

How many heroes does you map have per player -TheBear?
Is it a multiplayer map/have any allies with heroes and with shared units on?
 
Level 6
Joined
Aug 25, 2019
Messages
92
Oh, right. I was just preoccupied and surly at the time of that comment. We old people get like that at times.

Nevertheless, the maps seem to be incompatible. I guess I should have mentioned that I use version 1.27b. Yeah...
 
Level 19
Joined
Feb 27, 2019
Messages
590
Id suggest writing it in your signature or post it in the original post, its good to know for anyone who wishes to help.
 
Status
Not open for further replies.
Top