A bit more of an explanation:
----------------------------------------------------------------------------
@ Laiev:
ProjClasses is a very simple module because this type of thing changes from map to map. The module basically allows you to classify and individualise different projectiles without the need to use the [ljass]proj.attachData()[/ljass] method (to save it for something more important).
As it is only adding new members to the struct, it should be completely compatible with projgroups. You could use something like:
@ BlackRose:
Don't go crazy yet, I don't think it is as cool as you wanted it to be, I got too tired. But it is new, and new things are inherently awesome.
- ProjVisions: I think I have explained this in enough detail. Basically you call [ljass]proj.attachVision(600.00,true)[/ljass] for a projectile and that's it. The 600.00 refers to the vision radius, while the boolean parameter refers to whether you want the vision to linger after the projectile is destroyed (or if you remove vision via the detach method). Lingering vision lasts for 3.34 seconds (like many abilities from DotA and stuff).
- ProjClasses: I think people are thinking to far into this. This module will basically only give a projectile struct 3 more members to play with (two string members and one integer member), they are:
- [ljass]Instance.class[/ljass]: A string member that can be used abstractly in many different situations. For example: One may set it to "Fire" for one projectile and "Water" for another, giving each projectile an elemental classification that can be checked in grouping functions.
- [ljass]Instance.label[/ljass]: A string member that can be set to a more specific classification of a projectile. For example, one can set [ljass].class[/ljass] to "Fire", but also set [ljass].label[/ljass] to "Fireblast", basically giving the projectile a name (often the name of the spell it comes from).
- [ljass]Instance.power[/ljass]: The integer member that can be set to one of 6 predefined integers that determine the power level of a projectile (allowing stronger projectiles to destroy weaker ones and so on), they include:
- [ljass]PROJECTILE_POWER_NONE[/ljass]
- [ljass]PROJECTILE_POWER_VERY_WEAK[/ljass]
- [ljass]PROJECTILE_POWER_WEAK[/ljass]
- [ljass]PROJECTILE_POWER_MODERATE[/ljass]
- [ljass]PROJECTILE_POWER_STRONG[/ljass]
- [ljass]PROJECTILE_POWER_VERY_STRONG[/ljass]
- ProjEffects: This module has not been completed yet, but it will include one extra effect attachment for a projectile (I think more than that is overkill, but two can be necessary). It will also include "flash" methods that can be used to quickly display (i.e. create then destroy) an effect at the current coordinates of a projectile. I might also add an [ljass]AddSpecialEffectZ()[/ljass] function to it, as it allows for much more accurate effect placement when projectiles are in mid-air.
----------------------------------------------------------------------------
@ Laiev:
ProjClasses is a very simple module because this type of thing changes from map to map. The module basically allows you to classify and individualise different projectiles without the need to use the [ljass]proj.attachData()[/ljass] method (to save it for something more important).
As it is only adding new members to the struct, it should be completely compatible with projgroups. You could use something like:
JASS:
function ForNearbyFunc takes nothing returns nothing
if EnumProjectile.class == "Fire" then // Could also use: GetProjectileClass()
call EnumProjectile.terminate()
else
// Do cool stuff here.
endif
endfunction
// In some other function:
call GlobalProjGroup.forNearby(x,y,z,radius,data,ForNearbyFunc)
// Users can even develop a library full of constant globals that represent class types:
library ProjectileClassification
// Classes:
globals
constant string PROJ_CLASS_FIRE = "Fire"
constant string PROJ_CLASS_WATER = "Water"
constant string PROJ_CLASS_EARTH = "Earth"
constant string PROJ_CLASS_AIR = "Air"
endglobals
// Labels are more like individual names for projectiles to really individualise them (in case one spell specifically counters another).
// But they can also be used for whatever the user wants.
endlibrary
@ BlackRose:
Don't go crazy yet, I don't think it is as cool as you wanted it to be, I got too tired. But it is new, and new things are inherently awesome.