Transfer Item from Hero to New Hero

Super Shadow

New Member
Reaction score
1
I have a zombie map and theres a part where you can mutate your hero into an egg. Its a nightelf egg and its by the building command. Once the egg is complete i create a trigger that replaces the egg with a new mutated zombie hero level 1. The only problem is when they mutate into the egg, the hero loses all their items. How can i make the items transfer from the 1st hero to 2nd hero or 1st to egg to 2nd hero. Making the hero drop the items is ok too.
 

Grymlax

Probably not around
Reaction score
138
Code:
For each (Integer A) from 1 to 6, do (Actions)
    Loop - Actions
        Hero - Give (Item carried by [B]First hero [/B]in slot (Integer A)) to [B]second hero[/B] <gen>

this should do the work.
 

Super Shadow

New Member
Reaction score
1
it doenst work heres my trigger
Code:
Building Egg
    Events
        Unit - A unit Begins construction
    Conditions
        (Unit-type of (Constructing structure)) Equal to Egg
    Actions
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Hero - Give (Item carried by (Triggering unit) in slot (Integer A)) to (Constructing structure)
        Game - Display to (All players) the text: ((Name of (Triggering player)) + has begun a mutation process)

Code:
Finished Egg
    Events
        Unit - A unit Finishes construction
    Conditions
        (Unit-type of (Constructed structure)) Equal to Egg
    Actions
        Animation - Play (Constructed structure)'s death animation
        Wait 0.80 seconds
        Game - Display to (All players) the text: ((Name of (Triggering player)) + has completed its mutation process)
        Unit - Replace (Constructed structure) with a Mutated Flesh Demon using The new unit's default life and mana
        Sound - Play AbominationPissed5 <gen>
        Wait 1.80 seconds
        Sound - Play AbominationYesAttack4 <gen>
        Wait 0.90 seconds
        Sound - Play AbominationYesAttack1 <gen>

he turns into a building so u cant transfer from hero-hero
 

Tom Jones

N/A
Reaction score
437
Constructing unit and Trigger unit is the same unit.

I don't get how you want it to work? Does the zombie upgrade into the building? If so simply adding inventory to the egg should work.
 

Grymlax

Probably not around
Reaction score
138
it doenst work heres my trigger
Code:
Building Egg
    Events
        Unit - A unit Begins construction
    Conditions
        (Unit-type of (Constructing structure)) Equal to Egg
    Actions
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Hero - Give (Item carried by ([U]Triggering unit[/U]) in slot (Integer A)) to ([U]Constructing structure[/U])
        Game - Display to (All players) the text: ((Name of (Triggering player)) + has begun a mutation process)

Hero - Give (Item carried by (Triggering unit) in slot (Integer A)) to (Constructing structure

when you use the event Unit - A unit Begins construction then it's the building that begins construction not the worker. so therefor the triggering unit and the unit who begins construction is the same unit.
 

Super Shadow

New Member
Reaction score
1
well what i want is i got my zombie hero. When he gets to level 16 he is able to build an egg. The egg is a nightelf building. When he builds the egg i want him either to drop the items, or trasnfer them from zombie to egg. When the egg finsihes consturtion, i replace the egg with a new hero.

Giving egg inventory hero didnt work. Soo ya, this ones tough
 
D

dragonzeri

Guest
I have a zombie map and theres a part where you can mutate your hero into an egg. Its a nightelf egg and its by the building command. Once the egg is complete i create a trigger that replaces the egg with a new mutated zombie hero level 1. The only problem is when they mutate into the egg, the hero loses all their items. How can i make the items transfer from the 1st hero to 2nd hero or 1st to egg to 2nd hero. Making the hero drop the items is ok too.

I think you shud change the Finished Egg trigger a bit. Something like this:

Unit: Create a Flesh demon (or whatever...) at unit-position of constructed unit.
Loop - for each inger a 1-6 do actions:
Item: Give item caried in Constructed units inventory inger A to last created unit.
Set tempPoint to Unit - position of Constructed unit.
Remove Constructed Unti.
Move last created unit to center of tempPoint.

Something like that... Also give the egg pack mule or Inventory - hero ability. Good luck :)
 

Super Shadow

New Member
Reaction score
1
how do i make the egg have the items, when u construct it, even though it has hero inventory, it doesnt transer over
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top