How to create new heropool

I don't understand what you mean by hero pool.
You mean for a melee type of game, which heros are considered for hero limits?
I mean about heropool in this map. There is custom anime heroes which in 2 heropool. Heropool and heropool_ai. For example
set udg_heropool=CreateUnitPool()
set udg_heropool_AI=CreateUnitPool()
set udg_hero[12]=gg_unit_H02C_0046
set udg_unithero[0]=gg_unit_H006_0025
set udg_unithero[1]=gg_unit_H002_0017
set udg_unithero[2]=gg_unit_H001_0018
set udg_unithero[3]=gg_unit_H00G_0020
set udg_unithero[4]=gg_unit_H000_0019
set udg_unithero[5]=gg_unit_H004_0022
set udg_unithero[6]=gg_unit_H005_0009
set udg_unithero[7]=gg_unit_H009_0023
set udg_unithero[8]=gg_unit_H00A_0024
set udg_unithero[9]=gg_unit_H008_0013

I want to create new heropool where i can add new heroes. And i want separate this new heropool from this 2 heropool. I mean that.
 
I found some maps with that name, but they were all protected. Couldn't open them.

However it seems they are using Hashtables. Try looking for hashtable tutorials here on hive.

But what you can try is simply copying the triggers and copying the variables.
So you'll just do a
set udg_heropool_copy=CreateUnitPool()

But without seeing the map itself, I can't help you.
 
Unitpools are not exposed to GUI editor as far as I know. Maybe in custom map editors they are, but not in the default WC3 editor.
Here is how you create it in jass:
JASS:
globals
    unitpool myUnitpool = CreateUnitPool()
endglobals

Then you have the following functions to interact with unitpool:
JASS:
native UnitPoolAddUnitType takes unitpool whichPool, integer unitId, real weight returns nothing  // adds specified unit-type to unitpool with given weight
native UnitPoolRemoveUnitType takes unitpool whichPool, integer unitId returns nothing  // removes specified unit-type from unitpool
native PlaceRandomUnit takes unitpool whichPool, player forWhichPlayer, real x, real y, real facing returns unit // creates random unit from the unitpool, giving precedence to unit-types with higher weight

native DestroyUnitPool takes unitpool whichPool returns nothing // destroys unitpool, making it no longer usable
 
Back
Top