HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Attack problems.

04-04-2007, 07:31 PM#1
Centreri
I'm currently trying my hand on a reflex-based AoS, in which you navigate an archer with other units to destroy the enemy like in every other AoS.

For this to work, I want the monsters aiming to be somewhat intelligent, as well as non-following-the-target. I can achieve both separately, but not both at once.

If you change attack type to artillery and turn off the following of projectile, the attack won't hit if you move (unless you have splash), but it'll be stupid aiming - just aim at where he was. However, if you change attack type to missile and keep following of projectile off, the units intelligently aim - I tested by making a hero run while priests with these changes were attacking me, and they aimed brilliantly. They aimed for where I would be when missile hit, not where I am, so it was hard to see the change and change direction in time (The projectile missed, but I still took the damage because of 'missile' type). However, because of the conflicting natures of 'missile' and 'artillery', you can't have both these advantages at once, as far as I know. Is there any way to have both?

And another thing is that I want the regular attack of a unit to deal damage in a line, instead of just where it hits. A sorceress (artillery, no follow) deals damage only if it hit me straight-on , and if I moved in the direction of the sorceress, the projectile goes over me, not touching me. Any way to fix this? (I tried 'Artillery - Line', but I didn't see any difference between that and regular artillery)

Thank you in advance.
04-04-2007, 08:54 PM#2
Tide-Arc Ephemera
For the first one, you COULD issue an order for it to stop every so and so or stop when ever blah happens...

For the second one, I'm blind there...

For the third one... um... give the unit a Shockwave based ability and then have it cast that at a target's position OR dummy cast it.
04-04-2007, 09:00 PM#3
Centreri
I hoped to do it without abilities, but I'll do what it takes :P.

There are only two problems: The missile leading + artillery avoiding required, and the line-attack. How will telling a unit to stop fix the attacking problem?

Oh, and is it possibly to half creeps try to move away from the point of impact before the attack hits? How do I detect the position of where it'll hit?
04-04-2007, 10:42 PM#4
Castlemaster
@ Tide-Arc's reply for #3: I would look into seeing how vorpal blades works. It's supposed to make glaive thrower blades move through targets.

As far as the idea itself, that's a doozy. For creeps detecting where it will hit, you would have to make something detect when the unit fires (unit attack's ground or whatever you have for the attack command) and have it figure out the angle by storing the position of the firing unit as a variable then storing the point at which the ability was cast, and use the "math--angle between two points" function to define the angle. Once this is done, have the units range stored somewhere (array variable). Next take the position of any unit within radius of the attacker (based on range variable) and find if they are at the polar offset angle by 10 or less (if the angle is 70, find if they are 60-80). Then have them move accordingly. If you can figure out the point the unit is firing to, the rest is gravy.

I'm sure there's a simpler way but I can't think of one at the moment.
04-04-2007, 11:00 PM#5
Centreri
Yeah, Vorpal Blades seems to be a marvelous choice for that without using abilities. Thanks, I'll try that later.

For the moving away before impact, that's a very nice 'hopeful' feature - I don't think I have near the skill required to carry it out, because of Blizzard's neglecting of putting a 'Unit attacks' event.

Actually, are normal attacks registered as orders?

And I'd also like some feedback on combining leading of missile with dodging allowance of artillery - no way without abilities?
04-05-2007, 01:47 AM#6
Tide-Arc Ephemera
I ALWAYS forget about Vorpal Blades lol
04-05-2007, 03:24 AM#7
Castlemaster
@ at Centeri: there is a unit event under generic unit event called "a unit is attacked". As far as orders, If you tell unit A to attack unit B, and he hits him 10 times, you only gave the order once. More than likely it will not help you determine anything.

As far as difficulty to carry out my suggestion, check in the graveyard or Jass stuff to see if someone made an engine to detect where a ranged attack will land. It seems highly complicated because the computer is stupid and needs to be told every little thing. In all honesty the only hard part is find where the unit is facing when it attacks. I suggest that you could find this by using the math function angle between two points (under real number functions) by using the attacking unit and attacked unit as the two points. I was saying you could find the point of the attacking unit if your system worked by assigning an order targeting a point and that order was attack position of that unit.

As specific as you want it, it's gonna be hard to get it perfect without doing a smigden of tedious labor.
04-05-2007, 07:52 AM#8
grim001
you could just trigger everything