When i try to do that when you finish the upgrading of a building, you get a replace of that building and you recieve the items of the old building to the new one, bui went i go to test it, you get the replacement but the items dissapear.
Maybe add some waits? i don't know...
Trigger:
- LoboFantasmagorico
- Events
- Unit - A unit Finishes an upgrade
- Coditions
- (Unit-type of (Triggering unit)) Equal to Lobo Fantasmagorico
- Actions
- For each (Integer A) from 1 to 6, do (Actions)
- Loop - Actions
- Hashtable - Save Handle Of(Item carried by (Triggering unit) in slot (Integer A)) as (Integer A) of (Player number of (Owner of (Triggering unit))) in items
- Loop - Actions
- For each (Integer A) from 1 to 6, do (Actions)
- Loop - Actions
- Hero - Drop (Load (Integer A) of (Player number of (Owner of (Triggering unit))) in items) from (Trained unit)
- Loop - Actions
- Unit - Replace (Triggering unit) with a (Unit-type of (Triggering unit)) using The old unit's relative life and mana
- Set unitB[(Player number of (Owner of (Triggering unit)))] = (Last replaced unit)
- Unit - Order (Last replaced unit) to Stop
- For each (Integer A) from 1 to 6, do (Actions)
- Loop - Actions
- Hero - Give (Load (Integer A) of (Player number of (Owner of (Triggering unit))) in items) to unitB[(Player number of (Owner of (Triggering unit)))]
- Loop - Actions
- Unit - Set level of Desfase Astral (este si) for (Last created unit) to 2
- Item - Pick every item in (Region centered at (Position of (Last created unit)) with size (128.00, 128.00)) and do (Actions)
- Loop - Actions
- Hero - Give (Picked item) to (Last created unit)
- Loop - Actions
- For each (Integer A) from 1 to 6, do (Actions)
- Events
Maybe add some waits? i don't know...