So, when a unit attacks, you will be able to retrieve an actual attack object?
Unit attacks -> generate attack object
See, what I'm concerned about is being able to retrieve actual attacks like they are objects, both melee and projectiles. For example, the projectile would be the attack object. In melee, the attack object would be who knows what. When a unit ends up being hit, that attack object should be retrievable. Retrieving the attacking unit/attacked unit is semi useless without being able to retrieve the attack object.
Possibilities: chance to hit based on distance of the attack being initiated from the target unit. For example, if target unit is at 300z and the attack took place at 100z as a projectile, the chance to miss might be much higher. This data can't be stored on the attack unless there is an attack object. Just retrieving the attacking unit's coordinates would give inaccurate result as the unit could have moved while the projectile was heading towards the target. Does this make sense now? : )
A lot of people in the Warcraft 3 community have wanted attack indexing for a long time and there is currently no resource that accurately pulls this off in Warcraft 3, making this absolutely impossible to do it in Warcraft 3. I don't know if Starcraft 2 supports this or not. However, if Dawn of Fantasy supported this, custom combat would be incredibly easy to pull off and rather lightweight since it could let the c++ code deal with moving the projectiles or w/e and handle collisions.
Also, it might be very useful to be able to apply a velocity and acceleration to a unit. This would allow for custom projectiles without coding the movement of these projectiles in the Lua, which would allow for more projectiles on the screen at one time. The big bottleneck in custom projectiles on Warcraft 3 is the JASS code required to move them.