+-

Elder Scrolls


Author Topic: Dota 2 Custom gaming  (Read 3891 times)

Madhatters

  • Backbuilder
  • ***
  • Posts: 60
    • View Profile
Re: Dota 2 Custom gaming
« Reply #120 on: January 13, 2016, 03:24:18 am »
The attack rate is fine, the animation delay is the problem. From your hero file:
Code: [Select]
"AttackAnimationPoint"       "0.6"       // Normalized time in animation cycle to attack.
//"AttackRange"                "150"       // Range within a target can be acquired.
"AttackAcquisitionRange"     "150"       // Range within a target can be acquired.
//"AttackRangeBuffer"          "74"        // Extra range the target can move without canceling the attack
I'm not sure why range/rangebuffer are commented out, but it seems like a shepherd can start an attack on a unit within 150 range, and takes .6 seconds from starting an attack to actually dealing damage. During this .6 seconds, the unit being attacked must stay within (150+74 = 224) range of the shepherd. Sheep move 360 * .6 = 216 range in .6 seconds, so if they are moving you are never going to hit them. The values in wc3 are:
Code: [Select]
"AttackAnimationPoint"       "0.3"       // Normalized time in animation cycle to attack.
//"AttackRange"                "32"       // Range within a target can be acquired.
"AttackAcquisitionRange"     "650"       // Range within a target can be acquired.
//"AttackRangeBuffer"          "192"        // Extra range the target can move without canceling the attack
AcquisitionRange in wc3 meant the range a unit would recognize an enemy and automatically attack them (if they weren't a worker or doing something already), not sure what it means here.

Frost farms didn't track in revo, they had 125 area splash damage on a point target (600 missile speed, 600 range).

Is it possible to have two attacks? One for sheep, one for buildings?

Images travel at 1000 speed, and I think the pseudocode is something like:
Code: [Select]
p = casting point
level = terrain level at p
p2 = p offset by 128 range 90 degrees from casting unit facing angle
level2 = terrain level at p2

perform some sort of BFS from p2 on cells to find the nearest point at which a shepherd sized unit can be placed,
ignoring all cells that aren't at terrain level <level2>, and breaking after cell distance from p is > some value
(maybe 1280ish).

p3 = the point returned by BFS, or p2 if no valid cell was found

if (level != level2)
   perform the same BFS, except from p3 and excluding cells not at terrain level <level>,
   the point found is the final destination or there is no valid destination.
   p3 = point returned by BFS or null if no valid destination
else if (p3 is not a valid cell) // The first BFS didn't find a valid cell
   p3 = null
 

If (p3 == null)
   put shepherd at the original spot (p), I guess. wc3 had some sort of image cannot be created error that might apply in this situation
else
  start the missile animation towards p3, constantly checking to make sure p3 is still a valid location, and BFSing from p3 to find a new valid location if it isn't.

repeat for the image (mark p3 as occupied in the image's code)

(Emphasis on pseudo, and should be double checked)

PS. I would argue for making the image always get sent to the nearest of the two final destinations so the real would always be the one traveling over farms/jumps/fences.
« Last Edit: January 13, 2016, 04:43:42 am by Madhatters »

 

Recent Posts

Re: Sheep Tag (East) A Complete History by Mitnek
August 17, 2021, 04:11:39 am

Новинский ЗМК by MaxEurok
August 13, 2021, 02:06:24 pm

YOoooo by Celestial_One
February 04, 2020, 04:05:05 pm

hey guys! by Celestial_One
January 01, 2020, 01:08:18 am

Re: Alive? by GothaWOLF
September 27, 2019, 08:23:15 am

Re: Alive? by Nmcdo
September 26, 2019, 06:20:18 pm

Alive? by GothaWOLF
September 26, 2019, 07:40:50 am

SUP GUYYYYSSSSSSSSS by Sheepdice
September 20, 2018, 02:56:42 am


Shoutbox

View Shout History