Directional Search Area (take 2)

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
It has been a while since I have tried to figure this one out and I would like to start working on my map again.

I want to figure out a directional search area that would work to auto fire projectiles that would require the target to be angled a certain direction in order to pick up units in it's field.

example: phoenixfire-like ability that only fires missiles in front / behind / side of the ship/unit.

It's quite easy to add a missile ability with a periodic search area, but I would like to come up with one that only fires missiles in a specific degree range with respect to the unit's position and facing degrees...

I was hoping that some editor refinements have made this easier by now.

any thoughts?
 

Arkless

New Member
Reaction score
31
Use a persistent to get the target offset in the right direction:
offset_x = cos(angle)
offset_y = sin(angle)
Example for a 90° rotation right:
offsetx = 1 (-1 would be left)
offsety = 0

Now you can just use a search area.

Included a mouse-drawn pic :D also includes how to get a ray from 2 search areas (add a third in the middle if its really long).
zeichnung935.jpg


edit: *scratshes his head* seems like i've been wrong, x = 1 seems to be left and not right.. maybe i messed something up:View attachment ololol.rar <== btw. thats a testmap with missiles shooting to the left

Those bcs only shoot while their target is on the left side. Didn't mess with the target filters except removing missiles (game crashed the first time i tested it xD).
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
I will now digest this and comment soon. I might be in love with both of you. I need to sort my feelings first.
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Still haven't had a chance to really play yet but last attempts in october were showing it difficult. Arc didn't seem to work for me. besides the obvious problem that that wouldn't allow me to fire to the left and right only.


Arkless, how do I open a .rar file in galaxy? I can't find any tools to open them as a .sc2map file anywhere

*Edit* I downloaded a free .rar extractor online.
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
Oh wow

thank you so much Arkles!!!

I actually remember thinking about the offset but I never thought it would change the direction as well... figured it would just fire missiles from farther out away from my unit...


THANK YOU!
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
any ideas on how to implement this into a map where a unit could choose which side they wanted said missiles coming from but also which type...

at first thought this would require a separate behavior for each angle and each weapon... so that would be a lot of behavior sets. Doable but... is there an easier way?

like say... a specific behavior for the searches (different angle options) and still be able to pick the effects separately (type of missile)?

I'm thinking no... :(
 

Arkless

New Member
Reaction score
31
Well, you have to duplicate your stuff a lot of times, but you have to change next to nothing. It's not that much work.

If you are really desperate to not work much with data you can just use a dummy unit and periodically move it to the "shooting" unit, facing the same direction + shooting angle. You also have to add a behavior wich moves kill credits etc. to the main unit. This is not a way I would take.
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
I wouldn't want to go that direction because it is so clunky. Things like that tend to bring with them lag, inaccuracy, bugs, hassle.

I just don't want to start making a million copies of abilities and then realize I could have done it a different way...

>.<

I don't mind doing a ton of data work but I'm worried about then having to do each weapon for 4+ directions. (so you could choose which side you want it to fire from... upgrade it's angle, etc.

any idea if there is some trigger work (catalogues etc) that can modify an ability on one unit without manipulating it on others?
 

Dan

The New Helper.Net gives me great Anxiety... o.O;;
Reaction score
159
I'm kind of a hobbyist more than anything. I have very minimal programming knowledge. I'm 22, don't have a degree yet and I guildmaster for my wow family. If you wanted to throw me some contact info... I could show you what I've been working on though. Just don't expect some timeline layout of when I want to release my game. It's something I would like to polish for a while until it's everything I want it to be. I'm also still working out exactly what I want it TO be. But I have a good basic plan.

I use ventrilo pretty extensively. But whichever contact method you prefer works.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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