what attack are you enabling, and what attack are you disabling?
0 is attack 1
1 is attack 2
2 is both attacks
3 is no attack//I think, I could be one off on these values
First, you need your item. Here are some triggers I made that deal with the acquiring and loss of the tree:
- Acquire Tree
- Events
- Unit - A unit Acquires an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Tree
- Actions
- Animation - Add the upgrade animation tag to (Hero manipulating item)
I have to look, though, how to get the tree to not be white. I'll look for an answer and get back to you.
- Lose Tree
- Events
- Unit - A unit Loses an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Tree
- Actions
- Animation - Remove the upgrade animation tag to (Hero manipulating item)
So is there just one model of the tree or more than one? Meaning, do you have different types of items (trees) you can pick up or is there only one kind of tree? If there's only one, I suppose I could make the model for you with the tree attached to the mountain giant where the tree is always the same.
Sorry, I'm bad at explaining things. Say I make a mountain giant model holding one kind of tree, would that be OK? Or would I have to make multiple mountain giant models since there is more than one type of tree item? (I wouldn't suggest this as it would increase the map size too much).
Edit: It's the only thing I can think of at the moment... but I will search for other solutions.
Well, the mountain giant model is over 200KB.
There must be a way to make the mountain giant's tree not be white through changing the texture in-game, however.
I think that the first option is better, to be honest, but then again, your map is big enough. But anyways, I've come up with a quick little solution that should work (maybe with a little tweaking here and there), so long as your item isn't completely white as well.
Edit: Oh, yeah, the dummy tree wall is a regular tree just with no pathing texture (so that the tree doesn't make the mountain giant teleport). Also, I changed the war club ability to have 120 range, which I think is the item pick-up range.
- Acquire Tree
- Events
- Unit - A unit Acquires an item
- Conditions
- (Item-type of (Item being manipulated)) Equal to Tree
- Actions
- Set mountain_giant = (Hero manipulating item)
- Set temp_loc1 = (Position of (Item being manipulated))
- Destructible - Create a Summer Tree Wall (Dummy) at temp_loc1 facing (Random angle) with scale 1.00 and variation (Random integer number between 1 and 10)
- Unit - Order (Hero manipulating item) to Night Elf Mountain Giant - War Club (Last created destructible)
- Wait 0.80 seconds
- Destructible - Remove (Last created destructible)
- Custom script: call RemoveLocation( udg_temp_loc1 )
It works fine with the tree but the main prob is that the User Interface of the attack disappears
It probably switches to attack 2, which can be fixed easily by changing the ability.
Oh, I see what the problem is. You aren't using a unit with a second attack. Change the ability to look something like this:
Thx a lot +rep it worked perfectly