This is what I've done so far (see attachment). It gets the unit that is going to be hit by Lurker attack and moves it away.
The problem is that it only moves the unit that is going to be hit by the Lurker's attack and it does not move the other nearby units that will be affected by the Lurker's attack. Is there a solution to solve this problem?
If you look at how lurker attack effect is setup you'll see that it archives the line damage by calling 10 search area (circle of 0.625 radius) effects towards the unit with 1pt spacing between each.
There are actually 2 methods to simulate & detect which units gonna get damaged.
First would involve creating dummy effect in data that would match the original search effect of lurker. Then you would need to setup a trigger that would be bound to that effect. Then in your trigger "lurker starts attacking" you would manually run that dummy effect at the position of target unit.
Second method is to do the calculations manually using circle regions. Inside an "lurker starts attacking" trigger, measure the angle between lurker and its target. Then in loop through 1 to 10 fetch units that are inside each circle going towards the angle.
Natives you will need:
// measure angle between the lurker and targetnativefixedAngleBetweenPoints(pointp1,pointp2);// move the point by *distance* towards the anglenativepointPointWithOffsetPolar(pointp,fixeddistance,fixedangle);// create region at calculated pointnativeregionRegionCircle(pointcenter,fixedradius);// from unitgroup fetch units that are inside given regionnativeunitgroupUnitGroupFilterRegion(unitgroupg,regionr,intmaxCount);
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
How do I get the units that will be affected by Lurker attack (the hots lurker in the campaign)?
My first thought is to get the units in a line but I don't know how and where to start... anyone knows how?
This is what I've done so far (see attachment). It gets the unit that is going to be hit by Lurker attack and moves it away.
The problem is that it only moves the unit that is going to be hit by the Lurker's attack and it does not move the other nearby units that will be affected by the Lurker's attack. Is there a solution to solve this problem?
Bump.
Actually, the most important thing is to get the units in a line. Im not sure how though.
If you look at how lurker attack effect is setup you'll see that it archives the line damage by calling 10 search area (circle of 0.625 radius) effects towards the unit with 1pt spacing between each.
There are actually 2 methods to simulate & detect which units gonna get damaged.
First would involve creating dummy effect in data that would match the original search effect of lurker. Then you would need to setup a trigger that would be bound to that effect. Then in your trigger "lurker starts attacking" you would manually run that dummy effect at the position of target unit.
Second method is to do the calculations manually using circle regions. Inside an "lurker starts attacking" trigger, measure the angle between lurker and its target. Then in loop through 1 to 10 fetch units that are inside each circle going towards the angle.
Natives you will need: