I have an svc with an behavior what search the area around for enemy units. But i want it more exact so i try and atta validator to only look for 1 type of unit and then apply the effect on that unit.
This is the validator, why does it not work?
Validator type:Unit Type
Field Is Tower
Validator - Failure Result Must target unit
Validator - Find Enabled
Validator - Ignore While Channeling 0
Validator - Other Unit + (None):e_effectUnitUnknown
Validator - Result - Failure Error
Validator - Type Link
Validator - Unit + (None):Target
Validator - Value Tower
I try with this validator but for some reason it dont work.
Without the validator then the scv apply the effectto all enemy units.
I have another question as well regarding a validator.
I try to have a unit cast a buff on it self IF there is no friendly units nearby (2 radius) so i tried to me and Enumerate Area validator but the validator type is extremely strange and have not real logic behind it so i cant figure out to do it. Its like 3 comparisons in 1 validator, seams really wired. Any ide how to set it up to work?
I'm also trying to make a validator that check that it IS an enemy unit close by. Please help me with these validators.
You don't even need validators half the time for search area. Modify the search area flag field. You only have to "Require" it to be an enemy flag. You might need the validator to do the "no enemies near by" thing though. The poster above me has the right idea.
As far as the original poster goes. Id recommend just copying a current validator and changing the unit type. I'm not at my computer right now. But is there a unit compare validator? That might be what you need.
I have a unit that have a behavior and IF allies are close then it should dissable that behavior. This is done with a validator.
Just open up a new map and go to mothership for example and add a validator that make the cloakingfield stop function when a ally unit is close (3 in radius).
I have been trying to make this validator work but cant :/
You're right. The validator behaved strangly, returning false when I don't see why it would. Checking if no enemies are nearby seems faulty, but checking if there are nearby enemies gave the results I expected.
Here's a workaround if you don't mind using it. Using two validators; one checking if there are enemies nearby, and another returning the opposite of the first validator.
I have a unit that have a behavior and IF allies are close then it should dissable that behavior. This is done with a validator.
Just open up a new map and go to mothership for example and add a validator that make the cloakingfield stop function when a ally unit is close (3 in radius).
I have been trying to make this validator work but cant :/
If you dont mind, can you explain how this validator works? it has 2 "greater then etc etc" fields, why is that, how do they work or how should they work? You have both "not equal to" and "greater then" in the same validator, i cant figure how it work even after you provided the answer, i feel to stupid and irritated that there is no guide for this so i dont have to feel stupid when i ask :)
Did test some and changing "greater then" to "equal to" inverted the effect and the secound validator was not needed. However this was just pure testing, i still dont know what it compare to or what the "not equal to" does.
Anyway, a big THANK YOU for this, even tho i dont understand it i'm still happy i can apply it to my map but i really would like to know how it works.
To tell you the truth, I don't understand the validator fully, which is why I am not laying it all out for you. What I do know is that many validators have fields that are optional. For example, the Unit Type validator can check if a unit is equal/not equal to a specific unit, or another unit variable; but only if the other unit variable is specified.
What I'm guessing is that some of the fields in the Enumerate Area validator will only take effect if you specify certain fields. But as usual, the fields have very indescriptive names, and there is as good as no tooltips to help us out, so the only way to really understand the validator is to make a hypothesis, and do some research. If I ever need to use this validator I might get into it, but for now it's just not worth it to me.
Glad you made it work with only one validator. Good luck on your map :)
I now have finally been able to get evrything to work as i want exept the last final effect that i have no clue whatsoever how to make.
Effect = change owner of cating unit to owner to closest enemy unit. Any clue on what effect i should look into just to change owner? I prob need much more then just 1 effect but kinda need to know where to start :)
Changing owner is easy. If a caster applies a behavior on a target unit, the target will be owned by the player in the behavior field Behavior - Player as long as the behavior persists. It's the same way neural parasite does it. Take a look at it for reference.
I'm sorry, i have been talking about this on many topics so i maybe did not mention why my goal is :)
There is a tower on the map that modify the income of the owner and the tower can make captured by either team (2 team in total).
To capture a tower you have to have your unit close to the tower an no allied units close to the tower(guardians). A buff is then applied to the tower and when the buff expires then a effect will run and THAT effect is what we talk about right now. That effect is what will make the attacker capture the building and make it his own.
All that is done right now is done with the tower. Check the map i upload and you see what i mean.
How can i make and effect that issue a enemy unit close to the tower to cast a behavior on that tower? (take over the tower). Please complete the map if you like :)
After some thinking i think the tower need to search again for an enemy unit and apply a behavior on that unit to search for the tower and then cast the spell on that tower. Seams really messy when i dont even know how the spell works :D
You can refer to the unit initiating the capture by looking back in the effect tree that lead to the capture behavior being applied.
I've attached a test map for reference and renamed the effects to make them easier to find (for me) quickly when testing. The debug trigger I've made comes in handy a lot when sorting out things like this. It takes an effect and lists every unit variable at that point in the effect tree. Using this knowledge you can reference any unit within the same effect tree further down the line as I did in the behavior Tower - Control for field Behavior - Player.
I'm not 100% sure i understand this fully, i did not know it where possible to track back. Exactly what field is it that give the control of the tower?
Edit:
Copy and Paste FTW to my real map but i really would like to understand the process of this. Seams useful.
I have an svc with an behavior what search the area around for enemy units. But i want it more exact so i try and atta validator to only look for 1 type of unit and then apply the effect on that unit.
This is the validator, why does it not work?
Validator type:Unit Type
Field Is Tower
Validator - Failure Result Must target unit
Validator - Find Enabled
Validator - Ignore While Channeling 0
Validator - Other Unit + (None):e_effectUnitUnknown
Validator - Result - Failure Error
Validator - Type Link
Validator - Unit + (None):Target
Validator - Value Tower
I try with this validator but for some reason it dont work.
Without the validator then the scv apply the effectto all enemy units.
I presume the unit you want to apply the effect to is called Tower right?
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
@DrSuperEvil: Go
Yes :)
I have another question as well regarding a validator.
I try to have a unit cast a buff on it self IF there is no friendly units nearby (2 radius) so i tried to me and Enumerate Area validator but the validator type is extremely strange and have not real logic behind it so i cant figure out to do it. Its like 3 comparisons in 1 validator, seams really wired. Any ide how to set it up to work?
I'm also trying to make a validator that check that it IS an enemy unit close by. Please help me with these validators.
Look at the default validators Enemies Nearby and No Enemies Nearby, and modify the search filter for friendly units.
@Builder_Bob: Go
Cant get it to work even when doing that :(
Got a map showing exactly what does not work? 'Does not work' is really indescriptive
You don't even need validators half the time for search area. Modify the search area flag field. You only have to "Require" it to be an enemy flag. You might need the validator to do the "no enemies near by" thing though. The poster above me has the right idea.
As far as the original poster goes. Id recommend just copying a current validator and changing the unit type. I'm not at my computer right now. But is there a unit compare validator? That might be what you need.
Alright lets redo this some.
I have a unit that have a behavior and IF allies are close then it should dissable that behavior. This is done with a validator.
Just open up a new map and go to mothership for example and add a validator that make the cloakingfield stop function when a ally unit is close (3 in radius).
I have been trying to make this validator work but cant :/
You're right. The validator behaved strangly, returning false when I don't see why it would. Checking if no enemies are nearby seems faulty, but checking if there are nearby enemies gave the results I expected.
Here's a workaround if you don't mind using it. Using two validators; one checking if there are enemies nearby, and another returning the opposite of the first validator.
Alright lets redo this some.
I have a unit that have a behavior and IF allies are close then it should dissable that behavior. This is done with a validator.
Just open up a new map and go to mothership for example and add a validator that make the cloakingfield stop function when a ally unit is close (3 in radius).
I have been trying to make this validator work but cant :/
@Builder_Bob: Go
If you dont mind, can you explain how this validator works? it has 2 "greater then etc etc" fields, why is that, how do they work or how should they work? You have both "not equal to" and "greater then" in the same validator, i cant figure how it work even after you provided the answer, i feel to stupid and irritated that there is no guide for this so i dont have to feel stupid when i ask :)
Did test some and changing "greater then" to "equal to" inverted the effect and the secound validator was not needed. However this was just pure testing, i still dont know what it compare to or what the "not equal to" does.
Anyway, a big THANK YOU for this, even tho i dont understand it i'm still happy i can apply it to my map but i really would like to know how it works.
@Sherlia: Go
To tell you the truth, I don't understand the validator fully, which is why I am not laying it all out for you. What I do know is that many validators have fields that are optional. For example, the Unit Type validator can check if a unit is equal/not equal to a specific unit, or another unit variable; but only if the other unit variable is specified.
What I'm guessing is that some of the fields in the Enumerate Area validator will only take effect if you specify certain fields. But as usual, the fields have very indescriptive names, and there is as good as no tooltips to help us out, so the only way to really understand the validator is to make a hypothesis, and do some research. If I ever need to use this validator I might get into it, but for now it's just not worth it to me.
Glad you made it work with only one validator. Good luck on your map :)
@Builder_Bob: Go
Thank you again!
I now have finally been able to get evrything to work as i want exept the last final effect that i have no clue whatsoever how to make.
Effect = change owner of cating unit to owner to closest enemy unit. Any clue on what effect i should look into just to change owner? I prob need much more then just 1 effect but kinda need to know where to start :)
Changing owner is easy. If a caster applies a behavior on a target unit, the target will be owned by the player in the behavior field Behavior - Player as long as the behavior persists. It's the same way neural parasite does it. Take a look at it for reference.
@Builder_Bob: Go
SO how exactly how will the tower be able to order any enemy unit to cast that on the tower??
@Sherlia: Go
Could you rephrase that please? I don't know what you want to achieve.
@Builder_Bob: Go
I'm sorry, i have been talking about this on many topics so i maybe did not mention why my goal is :)
There is a tower on the map that modify the income of the owner and the tower can make captured by either team (2 team in total).
To capture a tower you have to have your unit close to the tower an no allied units close to the tower(guardians). A buff is then applied to the tower and when the buff expires then a effect will run and THAT effect is what we talk about right now. That effect is what will make the attacker capture the building and make it his own.
All that is done right now is done with the tower. Check the map i upload and you see what i mean.
How can i make and effect that issue a enemy unit close to the tower to cast a behavior on that tower? (take over the tower). Please complete the map if you like :)
After some thinking i think the tower need to search again for an enemy unit and apply a behavior on that unit to search for the tower and then cast the spell on that tower. Seams really messy when i dont even know how the spell works :D
Ah, I see.
You can refer to the unit initiating the capture by looking back in the effect tree that lead to the capture behavior being applied.
I've attached a test map for reference and renamed the effects to make them easier to find (for me) quickly when testing. The debug trigger I've made comes in handy a lot when sorting out things like this. It takes an effect and lists every unit variable at that point in the effect tree. Using this knowledge you can reference any unit within the same effect tree further down the line as I did in the behavior Tower - Control for field Behavior - Player.
Use this attachment instead. I forgot to remove some mess
(Getting the 404 kitten when trying to edit last post)
@Builder_Bob: Go
I'm not 100% sure i understand this fully, i did not know it where possible to track back. Exactly what field is it that give the control of the tower?
Edit:
Copy and Paste FTW to my real map but i really would like to understand the process of this. Seams useful.