The most straightforward way I see is the following:
Set the Ability Auto Cast and Auto Cast Intially On flags. Set the Ability Auto Cast filters to only include Enemies).
The ability will be effect instant. You will have a 2 second cast time (Cast Start Time).
Depending on how you want to accomplish the HP drain, you have 2 options. You can apply a behavior to the ward itself which does a periodic effect of searching around the ward and running a damage effect. The other option is to do a search effect and create healer effect (with negative hp granted to the target, creating a life drain). You will need to use a validator with the behavior or the create healer effect ot shut them off (Location range for the healer, enumerate area for the behavior).
I went for the morph ability into a new unit anyway. I have managed to almost get the ability to work. But there are some holes in it. Especially the morph ability drives me insane.
I upload some pictures of it.
And the MOD-file in case any friendly soul would mind to take a look. (Maybe it will be you again Kueken?)
The ability is called Null Ward and can be found on the Sentinel.
How on earth is this becoming so convoluted and complicated; this can all be done with a few simple behaviors. Have the unit naturally cloaked and from a training/placing ability apply the a timed life style behavior that uncloaked it and then removes the bahaviour once time runs out. The unit should have its own period behavior with a search effect and when the search finds a unit just apply a timed decloak behavior on the caster with the damage effect at the end. Have the actor of the units or a damage actor apply an animation or model swap when the final effect is activated.
I did not find any way to make a behavior notice when an enemy unit comes close to it. So my Ward just ended up sitting idle when the enemy moved across it.
How do you mean that a behavior can "notice" an enemy unit?
Edit: Yeah ok it applies a search effect, but still, how do I get the search effect to trigger a behaviour when the enemy comes near it?
Yeah, I THINK I understand how enumerate area validators work, but I need to teest to be sure... (I think they have basically 4 passes of stuff to validate).
I have experimented some more with enumerate validator. I ty to make the entire ability work with Behaviors ONLY. (No morph.) But the effect refuses to trigger when an enemy unit comes close, despite my Enumerate Validator.
1. The Ward is applied on the ground. A behavior is added to it via the spawn effect.
2. The Ward is visible for 10 seconds due to the added spawn behavior. After it expires, another buff is applied.
3. The applied buff lasts 180 seconds and cloaks the Ward. Its expire effect destroys the Ward. Here comes the interesting stuff: The buff also has a periodic effect that every 0.5 seconds runs a Apply Dummy Buff behaviour. THAT effect has a Enumerate validator that looks for enemy units within a range. So if an enemy unit comes close enough to the Ward, the Apply Dummy Effect should apply a "3 second duration buff" to the Ward.
4. The "3 second duration buff" makes the Ward visible and benign for 3 seconds. It's expire effect applies the slow-and-damage-search-buff to the Ward. (Here is the model swap suppose to happen, but I have not fixed that yet.)
5. The-slow-and-damage-search-buff is suppose to slow and damage nearby enemy units via a search behavior.
Crystal clear right?
I upload some pictures too.
What am I doing wrong? Nothing happens when an enemy unit comes close to the ward... : /
The helpful and wonderful Kueken531 has sent me a demo map on how to fix this dilemma.
In case anyone in the future will visit this thread, have a look at the file attached below and you will maybe be able to solve a problem similar to mine :)
I have an immobile Ward placed on the map.
When an enemy unit comes near it, the Ward will after 2 seconds become activated.
When it is activated, it drains life ever second from units around it.
What would be the easiest way to make this?
Is there any way to auto-activate an area ability IF an enemy unit comes close?
(Preferably without morphing the unit into something else.)
Hmm, the only way I find is to use a morph-ability. (Just as spider mines do.)
But I really do not want to create an other unit that it morphs into.
Is there no other way to trigger an ability or behavior when an enemy unit comes close?
The most straightforward way I see is the following:
Set the Ability Auto Cast and Auto Cast Intially On flags. Set the Ability Auto Cast filters to only include Enemies).
The ability will be effect instant. You will have a 2 second cast time (Cast Start Time).
Depending on how you want to accomplish the HP drain, you have 2 options. You can apply a behavior to the ward itself which does a periodic effect of searching around the ward and running a damage effect. The other option is to do a search effect and create healer effect (with negative hp granted to the target, creating a life drain). You will need to use a validator with the behavior or the create healer effect ot shut them off (Location range for the healer, enumerate area for the behavior).
Use an Enumerate Area valivator that itself is validated for the autocast.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Thank you for your help.
I went for the morph ability into a new unit anyway. I have managed to almost get the ability to work. But there are some holes in it. Especially the morph ability drives me insane.
I upload some pictures of it.
And the MOD-file in case any friendly soul would mind to take a look. (Maybe it will be you again Kueken?)
The ability is called Null Ward and can be found on the Sentinel.
How on earth is this becoming so convoluted and complicated; this can all be done with a few simple behaviors. Have the unit naturally cloaked and from a training/placing ability apply the a timed life style behavior that uncloaked it and then removes the bahaviour once time runs out. The unit should have its own period behavior with a search effect and when the search finds a unit just apply a timed decloak behavior on the caster with the damage effect at the end. Have the actor of the units or a damage actor apply an animation or model swap when the final effect is activated.
I did not find any way to make a behavior notice when an enemy unit comes close to it. So my Ward just ended up sitting idle when the enemy moved across it.
How do you mean that a behavior can "notice" an enemy unit?
Edit: Yeah ok it applies a search effect, but still, how do I get the search effect to trigger a behaviour when the enemy comes near it?
@Kabelkorven: Go
You can use an autocast ability or an enumerate area validator on a behavior for example.
Yeah, the Doctor above told me so. But I could not get it to work properly. But I can give it another look then. It can't be that hard..?
Do not dupe enumerate area validators they give problems if you do. Also some of the comparators are problematic.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Yeah, I THINK I understand how enumerate area validators work, but I need to teest to be sure... (I think they have basically 4 passes of stuff to validate).
I have experimented some more with enumerate validator. I ty to make the entire ability work with Behaviors ONLY. (No morph.) But the effect refuses to trigger when an enemy unit comes close, despite my Enumerate Validator.
1. The Ward is applied on the ground. A behavior is added to it via the spawn effect.
2. The Ward is visible for 10 seconds due to the added spawn behavior. After it expires, another buff is applied.
3. The applied buff lasts 180 seconds and cloaks the Ward. Its expire effect destroys the Ward. Here comes the interesting stuff: The buff also has a periodic effect that every 0.5 seconds runs a Apply Dummy Buff behaviour. THAT effect has a Enumerate validator that looks for enemy units within a range. So if an enemy unit comes close enough to the Ward, the Apply Dummy Effect should apply a "3 second duration buff" to the Ward.
4. The "3 second duration buff" makes the Ward visible and benign for 3 seconds. It's expire effect applies the slow-and-damage-search-buff to the Ward. (Here is the model swap suppose to happen, but I have not fixed that yet.)
5. The-slow-and-damage-search-buff is suppose to slow and damage nearby enemy units via a search behavior.
Crystal clear right?
I upload some pictures too.
What am I doing wrong? Nothing happens when an enemy unit comes close to the ward... : /
Just have a behaviour on the ward that is disabled by the validator, less lag.
Does the effect tree work without the buff? Would not having the search directly after the buff with a caster excluded filter not also work?
Set your editor to standard protocols before posting pics. Having + fields says nothing since the editor truncates the content.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
The problem is that I am doing something wrong with the Enumerate validator.
It is as if it does not react at all when enemy units come close.
Any words of advice to get the validator correct?
The helpful and wonderful Kueken531 has sent me a demo map on how to fix this dilemma.
In case anyone in the future will visit this thread, have a look at the file attached below and you will maybe be able to solve a problem similar to mine :)