| 10-10-2003, 07:04 PM | #1 |
I have an abil based off stasis trap that spawns a ward with a unit version of death and decay. I want the ward to instantly cast its death and decay when it is placed. Can someone tell me how to make a trig that does that? |
| 10-10-2003, 07:19 PM | #2 |
Um... Code:
Event Unit enters "playable map area" Condition Unit is of type "Death and Decay ward" Actions Order unit(entering unit) to cast "Lich - Death and Decay" at point (location of unit(entering unit) Thats one way, if you don't want it to cast it on itself, or you want it to cast when an enemy is near. Code:
Event
Unit enters "playable map area"
Condition
Unit is of type "Death and Decay ward"
Actions
Set variable "D&Dward" to unit(entering unit)
Turn on trigger (Cast D&D)
Cast D&D
Event
Every 1 seconds
Condition
Actions
Pick all units within 500 of "D&Dward"
if
Conditions
Owner of unit(picked unit) is enemy of player(owner of unit("D&Dward"))
Actions
Order "D&Dward" to cast "Lich - Death and Decay" at point of unit(picked unit)
Turn off trigger(this trigger)
Else
Do NothingThe disadvantages of that particular trigger is that it will have problems if there is more than 1 ward on the level... but I am sure that if you use arrays you can get around that. There are lots of ways to do what your asking... Another way would be to give the "ward" and attack that does 1 damage, then give it a High cooldown, then make an ability based of "Orb of Slow" (the ability, not the item) then modify the ability to cast "Death & Decay" instead. Then every time the "ward" attacks it will cast "Death & Decay" then all you have to do is set the cooldown for its attack to what ever you want the cooldown between casting D&D to be. Anyway, those are just some ideas. :ggani: |
| 10-10-2003, 07:36 PM | #3 |
Teh first one is short and sweet, I think I will try that. |
| 10-10-2003, 07:39 PM | #4 |
Yea that trigger would work, but if you don't want to use triggeres there is and easier way, just base the unit of healing ward and set its health effect to -4% a second and add effect of death and decay to the actual unit in the WE editor. HOWEVER, this ward will only start to damage units if the are not on full health, just as a healing ward would not effect a unit on 100% HP, It's not a huge problem, but it may be best to use triggers just incase. emote_sweat |
| 10-10-2003, 07:47 PM | #5 |
It worked! Thanks a bunch. |
| 10-10-2003, 07:47 PM | #6 |
Glad to help. If you were going to do it that way D4RKSLAY3R, it would prolly be easier to make a custom aura the effects hitpoint regen negatively, and give it to the ward and set it so it effects enemy units. That way it would effect units at 100% life. |
| 10-10-2003, 07:57 PM | #7 |
That is how I did it originally darkslayer and I even had a trig to reduce the units by 1hp so it worked on all units but it looked like it was healing enemies and I didnt want that. I also use healing ward so I also dont want it to make healing ward look like its killing things. |
| 10-10-2003, 08:12 PM | #8 | |
Quote:
To comply the last problem, u could just do a trigger that picks every unit within 500 (or whatever range) and set their health to original health -4%, then after that the ward will take over, even thoes who were at full health, as they will have taken damage tru the trigger :) hehe |
