• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How do you select an area in a spell? (cant explain in title)

Status
Not open for further replies.
Level 8
Joined
Aug 1, 2008
Messages
420
Quite confusing question here guys, and i'm pretty sure I dont know it because I havn't played warcraft 3 in over a year.

Anyway, I wanna make a spell, in which random stuff happens in a 600 aoe. I have the targeting image in a 600 aoe etc, but how would I select that 600 aoe for the triggers? I was hoping to make a point variable or something, but obviously, thats a point and not an area.. Would I have to have a region, then move the region to the point cast? That seems really unreliable to me.

What I guess I want is kind of like a unit group in a 600 aoe - except with terrain instead of units.

Its most likely a really easy thing to solve.. But as I said, i havn't used warcraft in over a year :wink:
 
Level 8
Joined
Aug 1, 2008
Messages
420
ehhh, I know, its really confusing.. hard to explain.

I mean I want to select the whole area, instead of one point. I cant remember if it does this by default, or just selects the middle point.. Ill draw something.

The dot in the middle is the middle target point (obviously). The circle is the aoe that I want to select. The crosses are the random points that I want stuff to happen at.

I just want random stuff to happen in random places, in a 600 aoe, but cant remember how to select the 600 aoe.

Get me now? :/
 

Attachments

  • Image.jpg
    Image.jpg
    21 KB · Views: 120
Level 17
Joined
Feb 11, 2011
Messages
1,860
  • Set p = (Target point of ability being cast)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 600.00 of p matching [your conditions] and do (Actions)
    • Loop - Actions
      • -------- Actions here --------
  • Custom script: call RemoveLocation(udg_p)
 
Level 8
Joined
Aug 1, 2008
Messages
420
  • Set p = (Target point of ability being cast)
  • Custom script: set bj_wantDestroyGroup = true
  • Unit Group - Pick every unit in (Units within 600.00 of p matching [your conditions] and do (Actions)
    • Loop - Actions
      • -------- Actions here --------

yeahhh, but thats units. Thats what I want - but with terrain/area. Is that possible? So it actually selects the area.

jeez, i dont even know what I want atm. my mind is a mess. -_- I guess thats it, but with area if possible. something like
  • Set targetpoint = (Target point of ability being cast)
  • Set area1 = (Area within 600.00 of p)
something like that if its possible.
 
  • Actions
    • Set Point1 = (Position of Unit)
    • Set Point2 = (Target point of ability being cast)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Distance between Point1 and Point2) Less than 200.00
      • Then - Actions
      • Else - Actions
    • Custom script: call RemoveLocation(udg_Point1)
    • Custom script: call RemoveLocation(udg_Point2)
Here you go.
Also I don't realy know what you want but you can change the locations(Point1 and Point2) to whatever you want as it will check whatever you desire in point1 to see if it's in range.
 
Level 8
Joined
Aug 1, 2008
Messages
420
improved the picture... err, kinda.

Mr_Bean987 said:
Oh I see. I know how to make it have a rectangular AoE, but not sure about a circular AoE. I will see what I can do.

EDIT: @DeathChef
He wants to pick a random location within 600 range of the target point.

yeah. I guess rectangle would be okay? I dont really mind, with the random points no one would really notice.

sorry for being awkward, aha..
 

Attachments

  • Image1.jpg
    Image1.jpg
    67.2 KB · Views: 119
Level 13
Joined
Oct 25, 2009
Messages
995
Maybe he mean this? o.o
  • Spell
    • Actions
      • Set Target_Point = (Target point of ability being cast)
      • Set Points[1] = (Target_Point offset by 200.00 towards 90.00 degrees)
      • Set Points[2] = (Target_Point offset by 200.00 towards 200.00 degrees)
      • Set Points[3] = (Target_Point offset by 200.00 towards 320.00 degrees)
      • Unit Group - Pick every unit in (Units within 150.00 of Points[(Random integer number between 1 and 3)]) and do (Actions)
        • Loop - Actions
Remember remove the leaks...
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [your ability]
    • Actions
      • Set Temp_Point = (Target point of ability being cast)
      • Set Temp_Point_2 = (Random point in (Region centered at Temp_Point with size (1200.00, 1200.00)))
      • -------- Actions --------
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call RemoveLocation(udg_Temp_Point_2)
The size of the region must be 1200x1200 because the radius of the circle is 600 therefore the diameter must be 1200.
 
Level 8
Joined
Aug 1, 2008
Messages
420
  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to [your ability]
    • Actions
      • Set Temp_Point = (Target point of ability being cast)
      • Set Temp_Point_2 = (Random point in (Region centered at Temp_Point with size (1200.00, 1200.00)))
      • -------- Actions --------
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call RemoveLocation(udg_Temp_Point_2)

Yeah I guessed it would have to be done with a region.
Does that trigger create the region too? And if it does, isnt that double the aoe? o.o
 
this should work :)
  • Actions
    • Set Point1 = (Position of Unit)
    • Set Point2 = (Point(((X of Point1) + (Random real number between -600.00 and 600.00)), ((Y of Point1) + (Random real number between -600.00 and 600.00))))
    • Custom script: call RemoveLocation(udg_Point1)
    • -------- Other Actions here --------
    • Custom script: call RemoveLocation(udg_Point2)
edit:
Ahh this is a damn active thread:p.
 
Level 8
Joined
Aug 1, 2008
Messages
420
yeah, its really just picking random points in a 600 aoe really.

keep posting, i have to go for a bit, ill come back later though.
 
Status
Not open for further replies.
Top