| 09-26-2003, 03:11 PM | #1 |
I need to make a spell that spawns a ward that drains a percentage of HP per second. What is the easiest way to do this? Can I just get some custom map editor that allows for negative values and make healing ward heal a negative percent or do I have to do trigs? If I have to do trigs then can someone show me how to do this with triggers. If I can use negative values on healing ward but not without a custom map editor which one should I use and what are some of the downsides to using a custom map editor? |
| 09-26-2003, 03:15 PM | #2 |
I'm not sure, but I think you can easily do it with negative values, and the normal World Editor allows that. Just go to File > Preferences and click the bottom box, "Allow negative real values in the object editor". |
| 09-26-2003, 03:21 PM | #3 |
Hey thanks. I didn't know you could do that in normal WE. |
| 09-26-2003, 03:41 PM | #4 |
Beware that if you use negative values based of Healing Ward or Heal that the enemy units with Full HP will not be affected immediatly(sp?). They will be affected once they dont have Full HP. - ByTe.ME uswest |
| 09-26-2003, 03:44 PM | #5 |
Yeah I just noticed that ingame. Got any ideas on a simple spell to convert that would work? Perhaps a simple trigger that reduces their hp by 1 point if its at full? |
| 09-26-2003, 03:57 PM | #6 |
The best would be to base the entire spell on triggers, unless you want to risk someone using Holy Light on a unit affected by the Death Ward, bringing it back to full. |
| 09-26-2003, 04:03 PM | #7 |
ya you can.. by using a trigger summoning a dummy unit with a dummy ability.. ill explain. First create a dummy UNIT ability base of Clap or FanofKnives with dmg set to 1 and remove the missle art/target art Then create a dummy unit with art model set to .mdl and unit shadow set to none, collision set to 1, and disable his attack. Give the dummy abilty to this unit (less call this unit dummyunit) Create a unit variable named dummyunit point variable named myspellPoint another unit variable named myspellCaster E- a unit issue order to a point C- order issue = (healingward) <--- this depends on which spell that you've based off C- unit type of ordered unit = () <---insert the hero with spell here A- set myspellPoint = target point of issued order E- a unit starts the effect of ability C- ability being cast = () <-----insert your spell here A- set myspellCaster = casting unit A- Create 1 dummyunit for (owner of(myspellCaster)) at center (myspellPoint) facing defult position A- set dummyunit = (last created unit) A- unit order (dummyunit) either thunderclap or fanofknives <---- this depends on which spell you've based off (the dummyspell dealing 1 dmg) A- wait 2 game time secs A- remove (dummyunit) from the game Hope this helps -ByTe.ME uswest |
| 09-26-2003, 04:16 PM | #8 |
That looks like it would work perfectly except for when units entered the wards range after it was cast. What if I had it say keep casting that 1 damage spell every second or so? Could you edit your trigger to include that? EDIT: I had an idea. What if for the spell cast I used flamestrike with no spell effects and no delay till hit and made the initial strike = to 0 and the after effect do 1 damage and last the duration of my ward spell? |
| 09-26-2003, 04:28 PM | #9 |
acutually now that I think about it, you can set life all enemy units in the region. this way you dont need a dummyunit or the dummyunit ability A- pick every unit in (units within 1000 of myspellPoint matching condition. (matching unit) is alive = true and matching unit belong to an enemy of (myspellCaster) and do actions loop actions - set the life of (picked units) to life of (picked units) -2 - ByTe.ME uswest |
| 09-26-2003, 04:38 PM | #10 |
Make an ability that summons a dummy unit. Give to dummy unit an ability based on Unholy Aura but with no speed increase and negative value of life regeneration. Et voilà . |
| 09-26-2003, 04:46 PM | #11 |
BlackSlash is right.. Doh How could I forget Unholy aura, its % based.. - ByTe.ME uswest |
| 09-26-2003, 05:00 PM | #12 |
Unholy aura is based on their normal regeneration rate, not their max life. If it is to have any effect it should at most be -500%. The best (IMO) is to make a trigger like this: *Note that you need a variable called Temp_Player Code:
Events
Time - Every 1.00 second of the game
Conditions
Actions
Pick every unit in (Units of type Death Ward) and do
Loop - Actions
set Temp_Player = (Owner of (Picked unit))
Pick every unit in (Units within 500.00 of (Picked unit) and do
Loop - Actions
If
(Picked unit) belongs to an enemy of Temp_Player
then
Set life of (Picked unit) to ((Life of (Picked unit)) - ((Max life of (Picked unit))/50)
<?Create special effect?>Yes, I am aware that it uses the Pick units loop twice, but it should still work. Only downside is that magic immune units will get affected by it, but they also get affected by (inverted) healing ward and (inverted) unholy aura so it should be ok. |
| 09-26-2003, 05:04 PM | #13 |
Your trigger would work katana but is it a good idea to have a event that runs every second? Wont that create lag? |
| 09-26-2003, 05:09 PM | #14 |
Uhmmm.. triggers time based make much lag in multiplayer maps. |
