HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Upgrade

08-20-2003, 01:57 AM#1
SzymonK
how to do hero will automatically upgrade (example: Mountain king transofrm into Paladin) when he reach 25 lvl
i know how to do upgrades with buildngs but this ... :O
08-20-2003, 02:00 AM#2
Tiki
triggers

unit event reaches lvl ?

remove targeted unit

create unit ? at triggering

something like that
08-20-2003, 02:13 AM#3
SzymonK
there are no type: reaches lvl :O :(
08-20-2003, 02:14 AM#4
Allanon[Druid]
Except use Replace instead of (remove, create unit)

EDIT: There is a way to check. Look harder next time... Check in Generic Unit Event. Here is a trigger...

Events:
Unit - A unit Gains a level
Conditions:
(Hero level of (Leveling Hero)) Equal to 25
Actions:
Unit - Replace (Leveling Hero) with a Paladin using The old unit's relative life and mana
08-20-2003, 01:10 PM#5
SzymonK
i do something but its not work i cant take type unit :O i must take unit from map :O but i doing Aos and i need that:
player selected Demon Hunter and Demon Hunter reach 25 lvl he transform into Illidan
08-20-2003, 01:41 PM#6
lordwiggin
open up fire blades arena and look at the morphing triggers its the exact same thing besides u need to change tghe lvl and heros
08-20-2003, 02:01 PM#7
SzymonK
i dont have :(
can u send me it to mail: [email protected]
thnx
08-20-2003, 02:05 PM#8
Allcaster
just use a unit type condition, if leveling hero is a demonhunter then bla bla.
08-20-2003, 03:21 PM#9
SzymonK
**** i hard i dunno :O
08-20-2003, 04:48 PM#10
Allcaster
hmm I think this is it.

there is just something crappy, I put the leveling hero somewhere else first to put over the items if someone knows a better way plz tell me.:D
08-20-2003, 05:42 PM#11
SzymonK
i take a look and u do it 2 long ive cut some and here u are :)
Events:
Unit - A unit owned by Player 1 (Red) Gains a level
Conditions:
(Unit-type of (Leveling Hero)) Equal to Felguard
(Hero level of (Leveling Hero)) Equal to 25
Actions:
Unit - Move (Triggering unit) instantly to (Center of (Playable map area))
Unit - Create 1 Overlord for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
For each (Integer A) from 1 to 6, do (Hero - Give (Item carried by (Triggering unit) in slot (Integer A)) to (Last created unit))
Hero - Set (Last created unit) experience to (Hero experience of (Triggering unit)), Show level-up graphics
Unit - Remove (Triggering unit) from the game
Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Items\AIsm\AIsmTarget.mdl


BTW. I dont check special efect but when u do it this no work ive edited it and maybe now it works.
And thnx u help me :D
08-21-2003, 11:38 AM#12
Allcaster
emote_sweat don't know if that will werk, you wil put the hero on the senter of the map now...

hope u know how to use fariables (if you don't press ctrl - b and paste that) becouse u need them just use the point u won't need the angle but it looks more realistic

ps. if u got tft use the generic unit effend, els get the actions for all players
08-21-2003, 12:47 PM#13
GuidingSpirit
Here is another way:

Create an Itemarray.
Create a variable to store the Exp-Points of the hero that should be replaced.

Event - like the Event you use SzymonK
Condition - like the conditions you use SzymonK

Now the Actions:

(I do not have the editor by hand so you have to find the triggers for the actions, but I know that they are there)

Store all Items of your hero in this array
--> Set Itemarray[1] = Item in Slot 1
--> Set Itemarray[2] = Item in Slot 2
...
--> Set Itemarray[6] = Item in Slot 6

Drop all items from your hero
--> Hero - Drop item from slot X

Store the Exp-points from the hero you want to replace
--> Set HeroXP = (Get Hero Xp or so...)

Replace your hero with the new one
--> Unit - Replace Unit

Set the Exp-Points of the new one.

Give the items you stored in the Itemarray to your new hero
--> Hero - Give ItemArray[1] to Hero
--> Hero - Give ItemArray[2] to Hero
...
--> Hero - Give ItemArray[6] to Hero

This trigger will replace your old hero with the new one where he is standing when he gains the Lvl-Up (Of course you can move the hero to the center of the map). And he will have the exactly same items as the old hero. This item-exchange will be handled in no time so no other hero will be able to steal an item. And if he does so he will not have the item long because it will be "teleported" to the hero when the transformation is completed.

Hope this helps