Morphing Hero disables Inventory.

CYBER_Aeon

New Member
Reaction score
11
I have a hero in my map that uses the ability 'Bear Form' to transform into a bear. So far, it works beautifully. In order to balance out the power though, I decided to make items in his inventory unusable while he's in Bear Form. (Besides, normal armor isn't going to fit a bear and I doubt he's very handy with a blade)

So I made a copy of the 'Inventory (Hero)' ability called 'Inventory (Hero, Inactivate)' and gave it to the Morphed version of the Hero.

PROBLEM: When the Hero activates or deactivates 'Bear Form' now, he drops all of the items in his inventory.

Anybody know how I can get the items to stay on the hero during the transformation? The end goal is that the Hero needs to be carrying all of the items, but not be able to use them while in the Bear Form. Keep in mind, this needs to be MUI. It's in a map with a lot of heroes, and there's that rare possibility that there will be two Druids in the game, and even that they may both activate Bear Form at the same instance.

+Rep if anybody can help me with this.
 

diamondhero5

New Member
Reaction score
9
object editor>abilities-default abilities> invintory(hero) to morphed unit

then gives all the items in the heros inv to the new one
 

CYBER_Aeon

New Member
Reaction score
11
That's basically what I did. But because it's a different inventory ability, it makes the Hero drop all of the items.

I don't want the morphed hero to have the same hero inventory either, because then he can use the items.
 

diamondhero5

New Member
Reaction score
9
o u mean when the hero morphs back he doesnt have any of his items?

if yes then just give it to him with triggers
 
D

Down

Guest
Code:
Untitled Trigger 001
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Metamorphosis
    Actions
        Wait 0.50 seconds
        Item - Pick every item in (Rect centered at (Position of (Triggering unit)) with size (125.00, 125.00)) and do (Actions)
            Loop - Actions
                Hero - Give (Picked item) to (Triggering unit)
 

CYBER_Aeon

New Member
Reaction score
11
Code:
Untitled Trigger 001
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Metamorphosis
    Actions
        Wait 0.50 seconds
        Item - Pick every item in (Rect centered at (Position of (Triggering unit)) with size (125.00, 125.00)) and do (Actions)
            Loop - Actions
                Hero - Give (Picked item) to (Triggering unit)

Thanks. That should help a lot. +Rep.
 

diamondhero5

New Member
Reaction score
9
Code:
Untitled Trigger 001
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Metamorphosis
    Actions
        Wait 0.50 seconds
        Item - Pick every item in (Rect centered at (Position of (Triggering unit)) with size (125.00, 125.00)) and do (Actions)
            Loop - Actions
                Hero - Give (Picked item) to (Triggering unit)

read above posts that not wat he want
that would give the hero items to the morphed bear

EDIT: I said to do that and he said no thats not wat he wanted
in the first post he said thats wat he wanted
so im confused
 

CYBER_Aeon

New Member
Reaction score
11
read above posts that not wat he want
that would give the hero items to the morphed bear

EDIT: I said to do that and he said no thats not wat he wanted
in the first post he said thats wat he wanted
so im confused

You had the right idea too, but Down actually gave me a trigger to use.
 

Somatic

You can change this now in User CP.
Reaction score
84
Its kinda easy, since you will want to make it such that he cant use his ability during the "Bear" form, Just make a unit with an Inventory of a normal Hero, detect the morphing with a trigger, Confiscate all items from him and store it in a variable like

HeroItem[] - Item Variable
HeroItemCharge[] - Integer Variable

Then Remove ability "Inventory - Hero"
Then when the hero transforms back, add all the item back to him again. That will work fine, since if you disable inventory, the hero will not even benefit from passive bonus the item gives.
 

CYBER_Aeon

New Member
Reaction score
11
Hmm. I really like that idea. It seems like the cleanest, but it's not really MUI, is it? If more than one player tries to morph at a time, it'll get mixed up, wouldn't it?
 

Somatic

You can change this now in User CP.
Reaction score
84
Idea Here
HeroItem1[X] - HeroItem6[X]
Thats for inventory number from 1 - 6 and X is for player number

HeroItemCharge1[X] - HeroItemCharge6[X]
Same Idea, bascially means you have the Players number to be the pointer to the corret item. hope it works! =)
 
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