💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!
function boss1 takes nothing y returns itempool
local itempool i = CreateItemPool()
ItemPoolAddItemType(i, 'I002',2)
ItemPoolAddItemType(i, 'I003',3)
return i
endfunction
Yes. It leaks two things. The itempool (Because you return it, you must destroy it sometime in the future) And you don't null the itempool, which can't be fixed because you need to return it.
I was afraid of that. Is there a way to do something similar using globals/constants (which I believe have to be done through VJass, but I'm not familiar with using either)?
I would tell you to use a global variable, but I don't know if you can create an itempool global variable...
You can use an item-type array instead of an itempool if the items will always be the same. Also, you won't need to create an itempool every time you want to get an item from the pool.
I would tell you to use a global variable, but I don't know if you can create an itempool global variable...
You can use an item-type array instead of an itempool if the items will always be the same. Also, you won't need to create an itempool every time you want to get an item from the pool.
I heard a rumor somewhere that VJass allows you to create itempools as global variables, and I don't want to use item-type arrays because I want the drop chances of the items to be easy to modify and there will probably be 50+ unique itempools/arrays.
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.