HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Research Woes...

06-08-2009, 04:09 AM#1
AnarchoGrunt
Is there a way simplify this? This trigger increases the level of innate abilities of heroes, so far I've only done one hero, but it's gonna be tiring, not to mention size-increasing, if I do it this way. I have 36 heroes all in all.

Trigger:
InnatesAlliance
Collapse Events
Unit - A unit Finishes research
Collapse Conditions
(Researched tech-type) Equal to Zealous Integrality
Collapse Actions
If ((Unit-type of PnHero[(Player number of (Owner of (Researching unit)))]) Equal to Wind Priestess) then do (Unit - Increase level of INNATE: Air Bind for PnHero[(Player number of (Owner of (Researching unit)))]) else do (Do nothing)

So is there a way I could define all the Innate abilities in a Variable and just increase the level of that Variable instead? Any workaround is welcome too. Thanks!

P.S. I don't have any idea on how to use JASS.
06-08-2009, 01:18 PM#2
0zyx0
You could use a huge If-Then-Else block, keeping the amount of triggers down to one, but that's not very good either. Another option is to use O(n) searches, which can cause unnecessary lag. You simply put all hero types in one array, and their innate ability in another array, using the same index as the hero. Then loop through the hero array, and check if the hero is that type, and if it is, use that index in the ability array to get the right ability.

That is also very troublesome, so the best solution would be learning JASS. There are many good tutorials for that, like this one, this one, or this one.
06-08-2009, 01:25 PM#3
AnarchoGrunt
@0zyx0: Thanks! I really don't have patience to learn JASS, so I'll stick to the GUI solution. If you know someone who might know another solution, please refer him to this thread.

Thanks again!