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

Hero learns ability

Status
Not open for further replies.
Level 1
Joined
Feb 24, 2011
Messages
6
Hey i want to know how to set a trigger so when that unit dies and is killed by player red, player red will learn the ability to summon that unit that died by the player that killed it same with blue,teal so on

thanks.
 
Last edited:
Level 11
Joined
May 31, 2008
Messages
698
You would probably have to trigger the ability, or create a summoning ability for every unit-type that is on your map.

If you choose the second option its easy, but could be tedious if you have a lot of types of units in your map. So it really depends.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
I made this same type of ability, named Necrogenesis
Each time you kill a unit, it overrides the last killed unit and saved the new one
If you doesn't kill any further unit, the last killed unit is permanently saved until you kill the new one

I know my test map is different from what you were requesting but, it's more advanced trigger I must say
Please come back here and comments on the given test map
If you're still not satisfy, I'll be doing your true request which is:
Starting hero unit does not has ANY ability
When the hero kills a unit, a new command will be available to further level the ability, starting with level 1 of course
But, if you do this, this will involve an issue, of "leveling up abilities through red cross"
When we ADD ability using trigger, that ability CANNOT be leveled up by pressing the red cross BECAUSE the unit doesn't have the ability to begin with
However, he can level it up by using trigger:
  • Unit - Set level of Necrogenesis for (Triggering unit) to ((Level of Necrogenesis for (Triggering unit)) + 1)
But the red cross will not appear (if you doesn't have ANY ability for that hero at the start of the game)

@wolfman
You doesn't need to save EVERY unit-type in that map, lol...
You can save it using trigger by variables :D
Take some dummy spell (like I did in my test map which is the Roar ability)
And load up the last killed unit, there you have it :D
 

Attachments

  • Necrogenesis.w3x
    14.3 KB · Views: 52
Level 1
Joined
Feb 24, 2011
Messages
6
I made this same type of ability, named Necrogenesis
Each time you kill a unit, it overrides the last killed unit and saved the new one
If you doesn't kill any further unit, the last killed unit is permanently saved until you kill the new one

I know my test map is different from what you were requesting but, it's more advanced trigger I must say
Please come back here and comments on the given test map
If you're still not satisfy, I'll be doing your true request which is:
Starting hero unit does not has ANY ability
When the hero kills a unit, a new command will be available to further level the ability, starting with level 1 of course
But, if you do this, this will involve an issue, of "leveling up abilities through red cross"
When we ADD ability using trigger, that ability CANNOT be leveled up by pressing the red cross BECAUSE the unit doesn't have the ability to begin with
However, he can level it up by using trigger:
  • Unit - Set level of Necrogenesis for (Triggering unit) to ((Level of Necrogenesis for (Triggering unit)) + 1)
But the red cross will not appear (if you doesn't have ANY ability for that hero at the start of the game)

@wolfman
You doesn't need to save EVERY unit-type in that map, lol...
You can save it using trigger by variables :D
Take some dummy spell (like I did in my test map which is the Roar ability)
And load up the last killed unit, there you have it :D


Im kinda looking for a hero that can learn a range of abilitys say at least 100 but only 6 will be possible(because thats all the room there is) and i want him to be able to learn a dmg spell off the start otherwise its impossible for him to kill certain units, im gona try use the trigger you gave me and maybe change it a little and mb find a solution to this, anways thanks for your imput
 
Level 1
Joined
Feb 24, 2011
Messages
6
You would probably have to trigger the ability, or create a summoning ability for every unit-type that is on your map.

If you choose the second option its easy, but could be tedious if you have a lot of types of units in your map. So it really depends.

Ive kinda already got that planned out its just about the triggering which im a bti confused say you kill a certain unit i want you to be able to summon that unit that you killed by using a spell for example: You kill unit (B) and you now have the ability to summon that unit. I want it so u can kill/summon over 50-100 units but you can only have a maximum of 5 summons spells and i want the summons to not run out until they die or are swapped with another summon i also want the summons to be like heroes, kill a certain unit and level up.
 
Level 11
Joined
May 31, 2008
Messages
698
  • Untitled Trigger 002
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SpellBBool[(Player number of (Owner of (Killing unit)))] Equal to (==) True
          • SpellABool[(Player number of (Owner of (Killing unit)))] Equal to (==) True
        • Then - Actions
          • Set SpellABool[(Player number of (Owner of (Killing unit)))] = False
          • Set SpellBBool[(Player number of (Owner of (Killing unit)))] = False
        • Else - Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SpellABool[(Player number of (Owner of (Killing unit)))] Equal to (==) False
        • Then - Actions
          • Set SpellASummon[(Player number of (Owner of (Killing unit)))] = (Unit-type of (Dying unit))
          • Set SpellABool[(Player number of (Owner of (Killing unit)))] = True
        • Else - Actions
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SpellBBool[(Player number of (Owner of (Killing unit)))] Equal to (==) False
            • Then - Actions
              • Set SpellBSummon[(Player number of (Owner of (Killing unit)))] = (Unit-type of (Dying unit))
              • Set SpellBBool[(Player number of (Owner of (Killing unit)))] = True
            • Else - Actions
  • Untitled Trigger 003
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to (==) SpellA
        • Then - Actions
          • Unit - Create 1 SpellASummon[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
        • Else - Actions
      • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Ability being cast) Equal to (==) SpellB
        • Then - Actions
          • Unit - Create 1 SpellBSummon[(Player number of (Owner of (Triggering unit)))] for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing (270.0) degrees
        • Else - Actions
There, the first one sets which unit to be summoned, the second one actually summons the unit.
And if all of the spells already have units assigned to them, it will restart the process and begin to replace the summons with new units that you kill, so if you kill one unit, that will go to SpellA, the second will go to SpellB, the third will replace the one from SpellA, the fourth will replace the one from SpellB, and so on. I only made this for 2 summoning spells, but you get the idea.

SpellA and SpellB can be any spell you want, probably just use channel instant cast, make sure that you check "visible" in options and all that stuff. Also change the base order ID for each spell.

**Also, remember to fix the location leaks.
 
Level 11
Joined
May 31, 2008
Messages
698
Okay, i made it :) heres the map
Each ability is pretty much just a slot for a creep that you can summon, and once they are all filled, they get replaced when you kill more creeps. But if your summonings kill creeps, it doesnt add that creep to one of your summoning slots. You have to use the actual guy that has the summons to fill up/replace his slots.
It also only works when you kill enemy units, so you couldnt kill your own summons to fill up the other slots.

And to make the summoned guys gain exp, you will probably have to create some kind of upgrading system for them where if they kill a certain amount of units they get an attack/health/armor/etc upgrade. Theres probly a few ways you could do this, idk what would be a very efficient way tho lol
 

Attachments

  • CreepSummon.w3x
    23.6 KB · Views: 44
Level 1
Joined
Feb 24, 2011
Messages
6
Okay, i made it :) heres the map

And to make the summoned guys gain exp, you will probably have to create some kind of upgrading system for them where if they kill a certain amount of units they get an attack/health/armor/etc upgrade. Theres probly a few ways you could do this, idk what would be a very efficient way tho lol

Ok thanks guys for all your hard work :) looking at the map now
 
Level 11
Joined
May 31, 2008
Messages
698
The only way is to make that unit, a Hero... lol
Pre-set it in Object Editor, it's a MUST

Well then you would have to make a custom exp system, unless you would want the creeps to gain exp from killing your summons and stuff xD which i guess wouldnt be the worst thing in the world.. lol

EDIT:
Actually, you could probably just periodically set all units owned by neutral hostile to have 0 exp, that would probly be easier :p
 
Status
Not open for further replies.
Top