HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Using ability fields

11-12-2007, 05:46 AM#1
Av3n
I've looked into Vexorian's Hero Selection System and shadow1500's recipie system, I've noticed that they use the ability's art effects in their implementation as well.

I just wondering how would this work. And what ability art effects (special, target etc.) would be used and what native is used to access it.

Thanks in advance

-Av3n
11-12-2007, 07:36 AM#2
Pyrogasm
Well, this is the functions I found to do this:
Collapse JASS:
native GetAbilityEffectById takes integer abilityId, effecttype t, integer index returns string

There are also some global variables:
Collapse JASS:
constant effecttype     EFFECT_TYPE_EFFECT = ConvertEffectType(0)
constant effecttype EFFECT_TYPE_TARGET = ConvertEffectType(1)
constant effecttype EFFECT_TYPE_CASTER = ConvertEffectType(2)
constant effecttype EFFECT_TYPE_SPECIAL = ConvertEffectType(3)
constant effecttype EFFECT_TYPE_AREA_EFFECT = ConvertEffectType(4)
constant effecttype EFFECT_TYPE_MISSILE = ConvertEffectType(5)
constant effecttype EFFECT_TYPE_LIGHTNING = ConvertEffectType(6)
The way you use the above function is this:
  • Determine what effect type you want to reference (Caster effect, target effect, etc.); all of the names correspond.
  • Determine the index you want to reference. Usually this will be 0, but sometimes you'll want to use a different number if you have, for instance, multiple special effects you want to play on a unit. In this case, the index of 1 refers to the second model in the list, 2 to the 3rd, and so on.
  • Call the function to get the string and then create the effect.
Seems pretty self-explanatory.
11-13-2007, 02:03 AM#3
Av3n
Thanks Pyro, thts helpes me a bit

+Rep

-Av3n