| 09-19-2006, 02:31 PM | #1 |
I am currently using ability-levels to store integers, for example: Ability: Lost Agility with 30 levels, to store the value of agility lost due to certain circumstances. And to get it, I use of course GetUnitAbilityLevel(). This value is only used by one trigger, meaning no other triggers would access it. Now the question is: Would storing the integer using HandleVars be faster? (SetHandleInt(...)/GetHandleInt(...)) Would it be bad for the map to have too many abilities like that for each Hero? I did notice how custom abilities slows down the loading-time a lot, but do they also slow down the map during the game when there are up to 30 Heroes, each of them having 10 such dummy-integer-storing-abilities? BTW: The dummy ability does have have an UI, so you can have as many as you want of them. |
| 09-19-2006, 03:08 PM | #2 |
I would say using Handle Vars is a much better option, it wont be faster, but it will reduce your map size by alot, and its loading time by alot. Im not sure how fast GetUnitAbilityLevel is, so i cant say much about that. |
| 09-19-2006, 06:07 PM | #3 |
Well, I would rather have both a big Map-Size and a long Loading Time than a laggy map. What I think is that Gamecache is slower, since gamecache is always slower =.=; |
| 09-19-2006, 06:25 PM | #4 |
it can not be slower than a bunch of GetAbilityLevels, besides that it is a terribly lame solution cause there are much more convenient solutions that are faster without compromising loading time.. And gamecache is not that slow. |
| 09-19-2006, 07:40 PM | #5 |
GetLevelAbility is that slow? Are you sure or are you just assuming? I am asking for making sure because I would have to recode a lot. |
| 09-19-2006, 08:07 PM | #6 |
the gamecache natives are slow. But the real slow thing is the VM I wouldn't say a single gamecache native will ever be beaten by 3 or 4 calls to GetAbilityLevel |
| 09-19-2006, 08:11 PM | #7 |
Handle variables make excessive usage of the slow I2S(H2I()). Direct game cache usage (if you are doing multiple calls) is far more efficient. |
| 09-19-2006, 08:23 PM | #8 |
Using abilities for this is just so very very... inconvenient. Use game cache, if that's for some wierd reason too slow then use unit custom value and global arrays. |
| 09-19-2006, 08:41 PM | #9 |
Fine, thanks. |
