| 07-10-2004, 05:41 PM | #1 |
I'm trying to do a spell that damages units in an area in front of the hero, just like Shockwave. Except I do not want to base the spell off Shockwave. In other words, I need to use triggers to pick those units and deal damage to them. I've tried it a few different ways, and none of them worked. Does anyone know how to do this? |
| 07-10-2004, 07:32 PM | #2 |
I believe that's pretty hard. Not sure, but i think so. I just tried creating an example and it didn't work out too good, alas I'm not the elite triggerer i wish i were. |
| 07-10-2004, 07:36 PM | #3 |
you could use jass and make a region of the area that you want the units to be damaged in. then select all the units in the rect. why you dont want to use shockwave i dont know but oh well. also know theres a dif between region and rect. rect is what the WE makes regions are what you generate through triggers and they can be different shapes. |
| 07-10-2004, 08:03 PM | #4 |
That all fine and dandy for finding a rectangular area ahead of the hero, but what if the area has to be triangular? He'd have to write a trigger that picks all units and checks if they angle from the hero to the picked unit is not beyond a certain variation of the hero's facing angle. |
| 07-10-2004, 08:23 PM | #5 |
Ok, I have no experience with JASS, so that's not a good idea for me. The reason that I don't want to use Shockwave is because there are other aspects of the spell that I want to control, such as building damage reduction, that Shockwave doesn't have. In other words, I can use Shockwave to deal the area damage, but then it'd be hell to add in all the other aspects of the spell. But yeah, selecting a cone in front of the hero is a pretty hard thing to do. I've been trying, to no avail. Any experts among us who could help? |
| 07-10-2004, 09:51 PM | #6 |
Make an invisible unit with permanent immolation at the position of the unit then order it to move to Point- Point with polar offset (position of (casting unit) off set towards Facing of Casting unit) on distance 1000 |
| 07-10-2004, 11:14 PM | #7 |
A cone... is that really nessecary? Other than that, though, this should be easy enough and, unless I read the question wrong, I've already done this sort of thing. You can use Vex's solution, but I think this is easier: create a region at (position of (hero) with size (AOE width, AOE height)) set position of (last created region) to position of (hero) with polar offset of (facing direction of hero) for each unit in region: blah blah blah, damage and whatever. That should work except maybe the cone shaped thing, in that case you would probably have to use many regions, which seems to me more pain then its worth. |
| 07-11-2004, 12:14 AM | #8 |
hmm i think for johnfn's idea you need a 3rd party editor cause all the normal 1 can do is move a region. @some smart jass person: theres a function for a cone at the jass vault but it takes a group and i dont know why. if someone could get it figured out thatd be great. http://kattana.users.whitehat.dk/viewfunc.php?id=267 |
| 07-11-2004, 01:25 AM | #9 | |
Quote:
Your jass thing looks like it is exactly what we want for a cone type thing though. |
| 07-11-2004, 02:06 AM | #10 |
why does it take group tho? does it find all units in a group that are also in the region? and i also wish i knew cos and sine so i could understand how it works but eh.. ill never use them |
| 07-11-2004, 03:52 AM | #11 |
I've already tried the offset a region method before posting. Problem is, a rectangular region is always vertical. In other words, if the hero is facing directly north or south in the map, yeah, it works fine. But if the hero faces at an angle, then it gets weird, because the trigger merely moves the center of the region to the point of offset, it doesn't rotate it. |
| 07-11-2004, 03:55 AM | #12 |
Vex's idea is one that I haven't thought of before, so I'll try it from that angle. Interesting idea, and theoretically should work. |
| 07-12-2004, 08:51 PM | #13 | |
Quote:
|
