Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
Looking to create a trigger similar to the Melee Game trigger that gives Town Portal to trained heroes, but I want it to be a random item from a specific item pool that I've created.
How have you defined the pool of items? That's the only part of the trigger that might be complicated. The rest is:
Events
Unit - A unit enters (Playable Map Area)
Conditions
((Triggering Unit) is a Hero) equal to True
((Triggering Unit) is in GIVEN_AN_ITEM_ALREADY) equal to False
Actions
Unit Group - Add (Triggering Unit) to GIVEN_AN_ITEM_ALREADY
//create item from pool and give to the unit
You can also do this with the Trained Unit event but I wasn't sure if that would trigger on hero revive. This definitely WILL trigger on hero revive, so I've added the unit group check to prevent a unit from getting more than 1 free item. This means it would also work for a trigger spawning the unit onto the map, in case that happens for some reason.
Is this line referring to a region? I'm having trouble finding this line in the conditions.
Ok I realise this is a custom variable unit group. I've not played with variables yet so I want to make sure I get this right. Do I just give it the name, or do I need to edit/add other things to this variable?
I'm also a bit special and can't figure out how to create an item pool. I thought I did, but I guess not.
A unit can only "Enter the map" once as far as I know. I suppose it could go out of bounds then come back, but then maybe just use (Entire map) instead of (Playable map area) to avoid that.
Or better yet in this case:
Events
Unit - A unit Finishes training a unit
Conditions
((Trained unit) is a Hero) Equal to True
That might not work for Taverns that sell units, though.
A unit can only "Enter the map" once as far as I know. I suppose it could go out of bounds then come back, but then maybe just use (Entire map) instead of (Playable map area) to avoid that.
Or better yet in this case:
Events
Unit - A unit Finishes training a unit
Conditions
((Trained unit) is a Hero) Equal to True
That might not work for Taverns that sell units, though.
I might give this a try.
I'm just having issue figuring out how to make an item pool. I thought I knew, but I can't seem to find what I was looking for.
I might give this a try.
I'm just having issue figuring out how to make an item pool. I thought I knew, but I can't seem to find what I was looking for.
Pyro will likely suggest something better, but here's the quick and dirty way:
Events
Map initialization
Conditions
Actions
Set Variable Item_Drop[1] = ...
Set Variable Item_Drop2[] = ...
Set Variable Item_Drop3[] = ...
Events
Unit - A unit Finishes training a unit
Conditions
((Trained unit) is a Hero) Equal to True
Actions
Set Variable RNG = (Random integer number between 1 and 3)
Item - Create Item_Drop[RNG] and give to (Trained unit)
Item_Drop = Item (array).
RNG = Integer.
The create action is called "give item to hero" or something along those lines, doesn't actually require it to be a Hero though (dumb name).
Sometimes you will want to add a default value or make the variable an array. You are free to name them whatever you want, it makes no difference. I use capitals and underscores to show it's a variable clearly in text, as your chain of confusion to understanding shows it can be useful.
wc3c had my itempools tutorial and I've never remade it, but really there's not much unique material to cover. Instead I can link MindWorkX's Itempools Guide. More trouble than it's worth for someone inexperienced, but you'd be able to implement them in GUI quite easily if you needed to. I think you've got the best solution for Grish.
I just tested. Revivable heroes re-trigger an "enters region" event they moment their revive finishes and become controllable. Current patch. (I altered what I wrote here because I had another trigger with the wrong event giving me wrong information).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.