| 04-12-2006, 04:53 AM | #1 |
Okay... I'm bored. So for however long this keeps me entertained, I'm offering my services to the community.
Everything will be on a first-come first-served basis, and anything that I do will likely be posted on www.wc3sear.ch for the community's use and education. |
| 04-12-2006, 08:25 PM | #2 |
make a reverse life drain spell that gives health instead of draining it, ends when hp is reached below X, make sure its memory leak free and in jass |
| 04-13-2006, 02:11 AM | #3 | |
Quote:
Actually Immoralis, couldn't you just modify the Life Drain ability? Data - Life Transferred Per Second, similar to how Mana Siphon works if you use it on an ally. It seems like that would be simpler, unless you wanted it to be more specialized than that. |
| 04-13-2006, 02:21 AM | #4 | |
Quote:
no, targets are hardcoded, in anycase i know how to get around this but im too lazy |
| 04-13-2006, 02:26 AM | #5 |
Oh, so you want the life to be transferred to an enemy? That seems a little odd, but I guess I just don't see any purpose for it. |
| 04-13-2006, 02:47 AM | #6 |
No, i think he is requesting an ability that allows a unit to heal another unit by giving up its own hitpoints. I dont think that lifedrain can function like this, so it would need to be triggerd. |
| 04-13-2006, 03:38 AM | #7 |
Then make the life drain ability, with an event when this ability is channelling, add 1 buff tat drains life to caster, and 1 buff tat gives life to target, these 2 buffs needs to drain and give same amount of hp. And make another trigger to check when the unit stop casting or stop channelling, then remove these buffs, also make a trigger to check life limit so tat when a limit is met, remove these buffs |
| 04-13-2006, 04:19 AM | #8 | |
Quote:
Hey Immoralis, If I understand you correctly.. the current Life Drain/Siphon Mana spells can do this. Code:
Data - Bonus Life Decay : 0.00 Data - Bonus Life Factor : 0.00 Data - Bonus Mana Decay : 0.00 Data - Bonus Mana Factor : 0.00 Data - Drain Interval (seconds) : 1.00 Data - Hit Points Drained : 0.00 Data - Life Transferred Per Second : 5.00 Data - Mana Points Drained : 0.00 Data - Mana Transferred Per Second : 0.00 Stats - Targets Allowed : Air, Friend, Ground, Organic The above settings will make it so that the spell can't drain life (removes the ability to target enemy units) and will replenish life (taking from the caster and giving to the target) by 5 health per second. For the automatic shut-off, something to the effect of the following should work: Trigger: The things with asterisks (*) around them are variable. The first (0.50) should be set to whatever you feel is a good frequency for the check. I'd suggest either the frequency that the spell drains life at, half that, or 0.1 (if it doesn't lag too much). [If this number is too high, you may want to add another trigger that detects when a unit in the UndrainLife_UnitGroup is damaged so that they're not damaged below the threshold and hten kill themself with the ability. The second (50.00) is whatever health threshold that you want the spell to stop at. If all this isn't good enough, then let me know why and I can create an actual JASS spell in a map for ya. |
| 04-13-2006, 12:40 PM | #9 |
Drain spells can NEVER target allies. They always go straight to hell if you try. |
| 04-13-2006, 12:54 PM | #10 | |
Quote:
By George, you're right... Targeting a neutral unit : Must target a friendly unit Targeting an ally unit : Must target enemy unit Targeting an enemy unit : Unable to target enemy units So how on earth does "Life/Mana Transferred Per Second" work? I swore I've seen it work this way before. Ah well, I shall get to work on this then. Update I was halfway through the spell and remembered where I saw Drain Life give life to the target--Enfo's Team Survival! Apparently, if you set Targets to "Allied" then the Drain Life spell does work on friendly units and not enemy units. Moreover, instead of using "Life/Mana Transferred", they use negative values for "Life/Mana Drained". |
| 04-13-2006, 02:41 PM | #11 |
Yeah, its finicky I guess. I know the mana one can work on allies, but it only works on allies with mana(lame) |
| 04-13-2006, 03:03 PM | #12 |
I have a question for a spell, if you have time. Maybe you don't even need to help me code it, but rather point me in a good start. I am making a huntress hero for my new AoS and I want one of her nukes to be a boomerang type nuke, where she throws a glaive at a targeted point, and then upon reaching there, the glaive returns back to the huntress. If the boomerang strikes units on the way to the targeted point, it deals (level*40) damage, and slows for (level*15)% in movement speed. If the boomerang hits units on the way back, it deals an additional (level*80) damage. This sort of spell exists in maps like Age of Myths (the predator has something similar) and the new DotA 6.30 (Rexxar's "Wild Axes") I want the huntress to be able to move while the glaive is out, so as to dynamically change the path of the boomerang on its way back, relative to the huntress. Also, as a bonus, while a glaive is thrown, I want the huntress to be at max speed. |
| 04-13-2006, 03:23 PM | #13 | |
Quote:
Hrmm... well, to start, you could look at a spell like Boomerang Axes ( http://www.wc3sear.ch/index.php?p=Spells&ID=7&sid= ) I haven't checked it out myself yet, but it'd at least give an idea of how to create a projectile and move it along a given path. I assume this spell has a means to detect when to damage a unit.. so simply alter the formula for your needs and also create a dummy unit to cast a slow spell on the target. According to the comments, you should be able to delete the PauseUnit line and still have the function work. If not, you'll just need to recalculate its pathing on the trip back. For the max speed, just use a trigger to max her speed when the spell is cast and reset it to the default speed when the spell ends. If you have any more questions, feel free to ask. I'll try to work on it after I finish up these other two things. |
| 04-13-2006, 04:06 PM | #14 |
Ok here goes. I made a spell, but its pretty sloppy. I need it multinstanceable. Im pretty sure it will need Jass. Decree of Silence It creates a sphere on target unit, that circles the unit. Each level of spell creates an additional sphere when cast. Is the targeted unit (with spheres) attempts to cast a spell, the spell is cancelled (casting unit still looses the mana) and a sphere is destroyed instead. Its basically a differnet form of silence. Ill upload my spell, in map its called gravity silence. Hope you can help. |
| 04-13-2006, 05:05 PM | #15 | |
Quote:
Interesting idea, but I'm not sure how to make it work in any nice fashion. You could give the target spell immunity for a split second, but it would likely come too late for instant spells and too soon on spells with slow projectiles. There's also no easy way that I can think of to account for the targets within an AoE spell. You could order a stop command and subtract the mana cost, but then you'd need to hardcode the mana cost for every spell and every level of that spell because those values aren't accessible through functions. You could also create a dummy spell for every spell. Design the dummy spell to do nothing and then only trigger the effect if the unit doesn't have an orb floating on him. Basically, there needs to be an existing ability that can cancel the casting of a spell in order for this to work.. but I don't think there is one, and I can't perceive any way of doing it. Does anyone else have any ideas? |
