| 02-19-2004, 11:09 PM | #1 |
I am making a Diablo III game, and I want the Necromancer to have a Corpse Explosion similar to the real game. If you can help, please reply. Thanx So far, this is what i have thought of: -base model: force of nature -raises a dummy unit from a corpse that lasts 0.1 seconds -dummy unit causes damage wen dies (like land mine) i dont know how to get it to do 40%-100% of the corpses life for damage. :( |
| 02-19-2004, 11:16 PM | #2 |
Store the target of the spell (even with it set to autocast, it should still PICK a target), and you can get the maximum life from that. The problem lies in dishing out the damage. Essentially, you can deduct life from nearby units around the dying corpse-bomb, but that won't credit the necro with the kills. You could be sneaky about this and add all units in the blast area around a corpse bomb to a unit group, find out how much exp they're worth, and give that exp to the necro.. but that'd sorta be a pain. My advice would be to keep it simple. Make level 1 CE do a small amount of damage in a small radius, level 2 corpses would have a different AoE on death that did more damage in a medium radius, etc. etc. |
| 02-19-2004, 11:20 PM | #3 |
First change the spell to one with a AOE selection. Then create two variables. Make one a Unit group variable and the other an Integer variable. Then try this: Code:
[b]Event:[/b] Unit begins casting an ability
[b]Condition:[/b] Ability being cast equal to <Ability>
[b]Actions:[/b] Set target of cast ability to <Point Variable>
Pick every unit matching condition ((Picked unit is dead) equal to true) and add picked unit to unit group <UnitGroupVariable>
Pick a random unit in unit group <UnitGroupVariable> and do:
[b]Actions:[/b] Set <IntegerVariable> to a random number from .40-1.00
Pick every unit in <AOE of spell> of picked unit and set life to ((Units current life) - (maximum life of picked unit x <IntegerVariable>))
Clear Unit Group <UnitGroupVariable> |
| 02-19-2004, 11:23 PM | #4 |
err, wat should i make the ability base be? im thinking force of nature, but im not that good wen it comes to triggers :P |
| 02-19-2004, 11:25 PM | #5 |
Base the ability off something with an AOE targeting reticle, like Dispel Magic. I'm not familiar with Night Elf abilities like Force of Nature, so I don't know if it qualifies. Important: I forgot to mention a variable! Create a Point variable as well. |
| 02-19-2004, 11:25 PM | #6 |
err should the integer have an initial value? no right? |
| 02-19-2004, 11:26 PM | #7 |
No, it shouldn't. |
| 02-19-2004, 11:38 PM | #8 |
k ima try out what u said, but either way, ill add u to the credits xD thanks alot >.< i forgot to add, on the "pick every unit matching condition" action, wat is it, i cant find it :/ |
| 02-19-2004, 11:44 PM | #9 |
Here, replace pick every unit matching condition with this: Code:
Pick every unit in <AOE of spell> of <Point Variable> and: [b]Actions[/b] If: Unit is dead equal to true Then: Add unit to <unit group variable> Else: do nothing Sorry, that was my fault. I forgot you can't do that directly. |
| 02-19-2004, 11:49 PM | #10 |
err i meant to say that i couldnt find the AOE of spell :( |
| 02-19-2004, 11:54 PM | #11 |
Oh! I'm referring to the AOE you think the spell should. That is what you put there, and it is totally up to you how large or small it is! :D |
| 02-19-2004, 11:57 PM | #12 |
:S wer is the value setting for an AOE? example: 300, i cant find anything like that, most of the stuff is regions :( |
| 02-19-2004, 11:57 PM | #13 |
If it werent for the fact that I dunno how to make the spell not SHOW the dummy units, you could use animate dead with a 0.1 duration then just have the damage be based on the unit that explodes hp(I'm SURE there's a simple way to do that). But since it's just 0.1 seconds and you have an explosion animation to cover it I would say try that. |
| 02-20-2004, 12:01 AM | #14 |
-.- the part were u said -- Actions If: Unit is dead equal to true what is the value of unit? :S |
| 02-20-2004, 12:07 AM | #15 |
Hmm... I like that idea. I'll adapt that, as it should be easier. Sorry for all the trouble, pappi.chullo. Let's try this again. Do as the above post stated and create an animate dead with a really small duration and use this trigger: Code:
[b]Event:[/b] Unit begins casting an ability
[b]Conditions:[/b] Ability equal to corpse explosion
[b]Actions:[/b] set <UnitVariable> to last created unit
Set <Integer> to a random number between .4 and 1
Pick every unit in [i]range[/i] of <unit variable> and do
[b]Actions:[/b] Set life of picked unit to (Current life of picked unit) - (<integer> x maximum life of <Unit>)[edit] The value of Unit is picked unit. |
