GUI detection of units in front of caster

Ticer

New Member
Reaction score
2
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?
 

Faust

You can change this now in User CP.
Reaction score
123
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.
 

Ticer

New Member
Reaction score
2
Where can I find acehearts system?

edit:I found it, but it seems like a really complitcated system for just one spell/trigger
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
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
 

Faust

You can change this now in User CP.
Reaction score
123
That's just the math. You put that thing in any trigger (and library I think).
THEN, you can use the whole computation with one line of command.
 

Ticer

New Member
Reaction score
2
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.
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
Easy here u go
Trigger:
  • THELPER
    • Events
    • Conditions
    • Actions
      • Set Loop = 0.00
        • Do Multiple ActionsFor each (Integer A) from 1 to 10, do (Actions)
          • Loop - Actions
            • Set Loop = (Loop + 150.00)
            • Set Point = ((Position of (Triggering unit)) offset by Loop towards (Degrees(180.00)) degrees)
            • Set Group1 = (Units within 150.00 of Point)
            • Unit Group - Add all units of Group1 to Group2

Group 2 has the units in front of u
 

Faust

You can change this now in User CP.
Reaction score
123
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 ^^).
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
@wolfienoct u can change to What u want it to be if for ability use target point of cast @Faust he wanted GUI not vJass
 

Ticer

New Member
Reaction score
2
Trigger:
  • Trample Copy
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shockwave
    • Actions
      • Set TempUnit = (Casting unit)
      • Set TempLoc = (Position of TempUnit)
      • 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)
          • Custom script: call RemoveLocation( udg_TempLoc2 )
      • Custom script: call DestroyGroup( udg_TempGroup )
      • Custom script: call RemoveLocation( udg_TempLoc )


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!
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
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.
 

Ticer

New Member
Reaction score
2
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)
          • Custom script: call RemoveLocation( udg_TempLoc2 )
      • Custom script: call DestroyGroup( udg_TempGroup )
      • Custom script: call DestroyGroup( udg_GroudSlam_G1 )
      • Custom script: call DestroyGroup( udg_GroudSlam_G2 )
      • Custom script: call RemoveLocation( udg_TempLoc )

Edit: This trigger is also in use with a knockback sys, http://www.thehelper.net/forums/showthread.php?t=123098&highlight=GUI+knockback+sys, Thx Tom Kazansky
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top