I've looked around on the forums for a action that sets a variable to a group of units in a line in front of the caster. I've found some answers in vJass, but thats all greek to me. Is there a way to do it GUI?
Why bother?
All you need is AceHart's GetUnitsInSector (or something like that) snippet.
You can call it with 1 line of custom script, it is all very convenient.
U need to have a loop and a variable integer of 150 and at start of loop ur variable = ur variable + 150 and and make a point there then make a group there with 150 radius then add the group to a new group that wil have al units in front of u. the biger the loop the futher the line wil go
Yeah, I downloaded his map and am looking at the trigger, alot simpler than his snippet made out to look like. Looking at it now in how to implement it.
Oh I just see I terribly misunderstood your question. I thought you needed the units in a cone, not a line. Line is different, and easier perhaps. There are several snippets for that too around the resource section I believe, try to browse.
Shark's idea is rather crude, but basically is what you are looking for.
But in GUI, it seems to me a little horrible (almost all GUI stuff does if you experience vJASS ^^).
Set TempGroup = (Units within 300.00 of TempLoc matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of TempUnit)) Equal to True))))
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Set TempLoc2 = (Position of (Picked unit))
Set KnockbackCall_Unit = (Picked unit)
Set KnockbackCall_Dur = 0.80
Set KnockbackCall_Dist = (400.00 - (Distance between TempLoc and TempLoc2))
Set KnockbackCall_Angle = (Angle from TempLoc to TempLoc2)
Set KnockbackCall_SFX = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
Trigger - Run Knocback Call <gen> (ignoring conditions)
This is the trigger I've been trying to work out, I want shockwave, or rather a spell like it, to push back the enemies it hits, so I'm looking for a way to find the units in a line in front of the caster. The trigger as is picks the units in an aoe range around the caster. Any help would be great!
Create dumy unit then make a triger that event is every .05 sec make variable where the dumy pos is make group of units around dumy move picked unit instantly to dumy. Il show trigs tomrow when i have my we near.
Figured it out, might need a little fine tuning, but the jist of it is here.
Trigger:
Ground Slam
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Ground Slam
Actions
Set TempUnit = (Casting unit)
Set TempLoc = (Position of TempUnit)
Set GroundSlam_Loc = (Target point of ability being cast)
Set GroundSlam_Angle = (Angle from TempLoc to GroundSlam_Loc)
Set GroudSlam_G1 = (Units within 200.00 of (TempLoc offset by 200.00 towards GroundSlam_Angle degrees) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is A ground unit) Equal to True)) and ((((Matching unit) is alive) Equal to True) and (((Mat
Set GroudSlam_G2 = (Units within 200.00 of (TempLoc offset by 600.00 towards GroundSlam_Angle degrees) matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is A ground unit) Equal to True)) and ((((Matching unit) is alive) Equal to True) and (((Mat
Set TempGroup = (Units in (Playable map area) matching ((((Matching unit) is in GroudSlam_G1) Equal to True) or (((Matching unit) is in GroudSlam_G2) Equal to True)))
Unit Group - Pick every unit in TempGroup and do (Actions)
Loop - Actions
Set TempLoc2 = (Position of (Picked unit))
Set KnockbackCall_Unit = (Picked unit)
Set KnockbackCall_Dur = 0.80
Set KnockbackCall_Dist = 350.00
Set KnockbackCall_Angle = (Angle from TempLoc to TempLoc2)
Set KnockbackCall_SFX = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
Trigger - Run Knocback Call <gen> (ignoring conditions)
Ghan has said he has fixed this. Monovertex please confirm this fix. This was only a problem with people that had signatures in the upper levels like not the special members but the respected members.