| 08-11-2006, 07:43 AM | #1 |
Im having some trouble creating a certain spell, and was hoping someone might be able to help me. I am trying to create an ability that when cast will detonate the caster, damaging enemy units in an area around the caster equal to the casters life (before detonation ) divided by the number of enemies in that area,while simultaneously healing allied units in the same way. Also, I was wondering if anyone knew how to make this spell work so that more than one person can cast at the same time, or the same person can detonate multiple units. Thanks. |
| 08-11-2006, 08:46 AM | #2 |
You mean, instantly kill the caster? Well, that can be done by using a variable to save the number of units in the area, and then ordering the unit to damage the area : the number of units. |
| 08-11-2006, 10:44 AM | #3 |
I would help, but i have my own spell to make. Once i'v made that i'll help you. |
| 08-11-2006, 12:12 PM | #4 |
I would make it with a dummy spell, your choice if targeted or non-targeted. Store the life in a variable, then count the number of units within x Range to the Caster and add them to a temp Group Afterwards you pick every unit in your temp Group and order the caster to damage the picked unit with (Health / Number of Units counted) if it's an enemy and to heal use the same formula with the set hp command. P.S.: Sry, my comp crashed and i didn't install WC3 yet. So there could be some probs, i'll install WC3 in a few moments and look if it will work that way. |
| 08-11-2006, 09:04 PM | #5 |
Thanks for all the replys. I havn't mapped wc3 in a while so I'm not sure exactly how to do what you said. If someone could give me the exact triggers to make, that would be greatly appreciated. |
| 08-12-2006, 01:11 AM | #6 |
Kaboom? I dunno if thats targetting or not... |
| 08-12-2006, 03:09 AM | #7 |
Hello^^ Kaboom is targetable. And... You can use a enemy-allowed Blizzard and a friend-allowed Healing Spray from aside. |
| 08-12-2006, 11:14 PM | #8 |
hehe... didn't know... Haven't been using WC I've been camping... ^_^" |
| 08-13-2006, 12:40 AM | #9 |
Umm... I'm trying to make the damage/heal be the health the caster had divided by the number of units in the area (as in my first post). I can make a spell that does blizzard and healing spray lol, but I'm not sure the exact triggers for the one I'm looking for. |
| 08-19-2006, 10:59 PM | #10 |
Sorry to have to post again, but my problem is still not resolved, and everyone seems to have forgotten about it, lol . If someone could be kind enough to post the code in [trigger] tags, it would be greatly appreciated.Ty. |
| 08-20-2006, 12:24 AM | #12 |
Sweet, thanks for the reply. A few questions: How could you make it so it heals the allies in the area in the same way it damages the enemies? Do Ijust duplicate the damage one and set the damage dealt to be ( -1 x (Spelldamage)) ? Is that multi-instanceable? Ty. |
| 08-20-2006, 12:51 AM | #13 |
Well, Multi-Instancability can only really be done why using local variables instead of global ones, or something like that. I've seen a lot of examples of how to do it, but it still doesn't make sense to me. To do the healing thing, I think doing what you suggested is right. But, then you'll need to change the Temp_Group or make another group that- instead of counting the number of enemies in the area, it counts the number of allies in the area. I'm not sure if you can use one group, then change it, and use it again in the same trigger(never did it before). Try it and see if it works. Btw, for some strange reason when I was testing the AOE thing, it said that "set udg_SpellDamage=null" was unreadable? Integers can't be nulled? Or is there no need to? |
| 08-20-2006, 01:16 AM | #14 |
I'm not at a computer where I can access warcraft at the moment, but hopefully using one group twice in a single trigger works, lol. I'm not too sure about multi-instancability and memory leaks etc, so when I can get access to warcraft, I'll just try it and see how it works. BTW: It is possible to use local variables through custom script in GUI, or does the whole spell need to be done in JASS? Thanks again. |
| 08-20-2006, 01:25 AM | #15 |
Nah. You call them by using the "Custom Script" that GUI has. The custom script IS JASS. |
