2 Heros Sharing Inventory

Toriad

New Member
Reaction score
4
So I am currently working on a map in which I want the player to be able to switch his hero, but keep the inventory. So if hes playing one hero, he then steps on a circle of power, which hides that hero, creates the new hero, gives all of the items to the new hero. Then when he switches back he steps on, it gives all the items back to the hidden hero, unhides him and deletes the other hero.

Example.

You go out in Builder form(a normal unit with hero inventory) get 5 items, go back to your circle and change into Savage form(a Hero unit with hero inventory) you have those 5 items still. Now say you find another item making 6 total, and you switch again your Builder form will have the same 6 items. And if you use one, then switch back its gone on the other inventory.

I thought of doing this by switching out each item in the units inventory but it didn't seem to work as well as i had hoped.(Some items didn't get moved)
 

polo2005

Wana start playing LoL? http://tinyurl.com/369as27
Reaction score
97
there exist a replace funktion

Code:
Unit - Replace (Triggering unit) with a Footman using The old unit's relative life and mana
 

Toriad

New Member
Reaction score
4
Thats perfect for swapping the hero but it causes any items held by the hero to be lost forever, I want the inventories to swap as well.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Wel store the items in variables then replace unit then give him the item variables
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top