| 07-04-2004, 05:28 AM | #1 |
Hey guys, k here's the general idea of what I want to do. If you've played EOTA or The Big Chill you will have seen this spell before. In EOTA the blademaster has it, the hero teleports to a point and all units caught in the path between him and that point take damage. I just can't seem to come up with a way to do this. I tried creating an invisible caster at the Hero's location when he casts Blink and having it cast Shockwave (with the missle art disabled) to the target point, but the only problem is the shockwave will go a set amount of distance, despite the distance the hero teleports, which obviously wont do. Does anybody have the solution? I know it's possible but my lack of experience in the custom spell department wont allow me to do ti :\ Thanks in advance guys :D |
| 07-04-2004, 07:48 AM | #2 |
A possible solution, that is very similar to your own, would be to have a few "shockwave" spells with different ranges and use the one that is closest in range to the distance to where the hero teleports. You could just store the spells in an ability-variable array, let's say, one spell for every 100 units of distance, and then determine the ability to use like this: shockwaveVariable ((distance between(target point of ability being cast) and (position of (casting unit))) / 100) |
| 07-04-2004, 07:55 AM | #3 |
if your trying to copy TBC spells then ure gonna need some pritty advanced triggering, i know ultra personally and he has some very interesting and original ways of doing his spells. |
| 07-04-2004, 08:11 PM | #4 |
thanks for the help Anitar, I think I'll do that, probably wont be the most accurate thing in the world but it'll be good enough. |
| 07-04-2004, 09:53 PM | #5 |
Well, I don't think you need any "original" ways to come up with this, just basic maths. Just check each unit on the map for being on the straight line with points StartPoint and EndPoint within a margin of error if you want that. Also check if it is contained inside those points rather than outside of them. I'll give you a short example. StartPoint 0,0 EndPoint 2,4 so the equation is: y = 2x now, a unit with point (1, 2.5) is picked. If you plug it in the equation, it gives 2.5 = 2, which is not true. but obviously you would have a margin of error, because there won't be much units on the exact line. So we define the margin of error M = 1. then we minus the 2 sides, which is 2 - 2.5 and then we take the absolute value, which we compare to M. abs(2-2.5) = 0.5 0.5 < M therefore, the unit should take dammage. This is not all there is to it, because you have to have boundaries too, tell me if you want to know more. Hope this gives you an idea. DeSty |
| 07-04-2004, 11:10 PM | #6 |
Note, desty, that your equations are comparing the differences in the angle of the lines, one from start of the spell to finish, the other from the start of the spell to the unit being compared. This means that the further away a possibly affected unit is from the caster, the greater is the absolute margin: you get a cone-shaped area of effect. And another thing, you are not comparing actual angles (in degrees), but the percentage of the angle; there is a considerably bigger difference between 1*x and 0*x (45 degrees, actually) than between 7*x and 8*x. I believe that a good rule to follow is: do as much as possible with spells and as little as possible with triggers. Spells simply have so much built into them (in range/area detection, giving experience when killing, effects,...) that it would be foolish to do such stuff entirely with triggers. |
| 07-05-2004, 06:25 AM | #7 |
err... crap I've encountered a problem. I can use 10 different shockwave spells, one per 100 units or range, but I didn't take damage into consideration. This spell will be 5 levels, therefore it would take 50 shockwave spells for this to work right, 5 levels of damage per 100 units, and there's no way in hell Im going to do that. Is there someway to keep it to 10 by making each have 5 levels and have the caster put points into it according to the level of the Dummie Spell? |
| 07-05-2004, 06:55 AM | #8 |
What about making an invisible guy with a modified permanent immolation with really fast movement speed to run from the original spot to where you blink to? |
| 07-05-2004, 07:51 AM | #9 |
Yeah, combo stuff can get annoying like this, I know I have tons of same abilities in my Arena map because of multiple combos... Anyway, you could make the shockwave ability a hero ability, create a hero dummy caster and give the ability to it, and then, when you have to cast it, give the appropriate number of skillpoints to the caster and learn the ability the same number of times (use a loop) depending on the level of the "blink" ability. But that still gives you 10 hero abilities, which is still something... An alternative would be what sc_freek suggested, but you can't be sure about the exact damage that will be dealt here, because the immolated unit can be near different units for a different ammounts of time... |
| 07-05-2004, 07:57 AM | #10 |
Yah I think Im gonna do the 10 hero abilities and just stick it out. I tried the imolation thing but the only problem is the maximum unit speed is 512 or something and that's much too slow, thanks to everybody that helped out. *Works on map* |
| 07-05-2004, 08:17 AM | #11 |
or you can do it the following way: Upon being cast, create an invisible unit at the location of the caster facing the direction of the target point of issed order. Assign it a variable. Then turn on a trigger that every 0.1 seconds of game time moves the created unit 100 units towards the facing angle of created unit. In teh same movement trigger pick every unit within 200 of the created unit and create another unit on top of every picked unit, assign this unit a generic expriation timer of 1 second and have it cast\attack the picked unit before it dies. Then have a 3rd trigger that checks evert 0.1 seconds if the created unit is within 200 range of the blademaster, if so kill the created unit and disable the movement trigger. |
