Unit gives items on death

Surferkid993

God surferkid993 = new God(awesome.me);
Reaction score
16
I am making an ability that makes a serpent ward. But it has no attack, you can put items in its inventory like the items used in battleships and tank wars. When this ward dies I wnt the items to go back into the inventory of the summoning unit. How do I make the items return to the summoning unit?
 

Axe.killer

New Member
Reaction score
24
item back to the unit
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Serpent Ward (Level 1)
Actions
Hero - Give (Item carried by (Dying unit) in slot 1) to No unit
Hero - Give (Item carried by (Dying unit) in slot 2) to No unit
Hero - Give (Item carried by (Dying unit) in slot 3) to No unit
Hero - Give (Item carried by (Dying unit) in slot 4) to No unit
Hero - Give (Item carried by (Dying unit) in slot 5) to No unit
Hero - Give (Item carried by (Dying unit) in slot 6) to No unit

Also give serpant ward, inventory- hero. In saying that, the serpent ward is now treated as a hero. Replace no unit with the hero u want
 

AgentPaper

From the depths, I come.
Reaction score
107
Code:
Return Items
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to <summon spell>
    Actions
        Wait <time summoned unit lasts -a second or 2> game-time seconds
        For each (Integer A) from 1 to 6, do (Actions)
            Loop - Actions
                Hero - Give (Item carried by (Summoned unit) in slot (Integer A)) to (Summoning unit)
 
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