I want to make a search area validator so that it only look for targets who does not have full energy but i seam to not be able to do so. My validator i made work if i add the validator to the effect that the unit get when its found but thats not how i want it.
This is the current validator i use but when i add it to the Effect - Validators for the search area effect then it does not work, in fact it make it so that i does not find any targets at all :/
As i understand it.
Delta = maximum - current value. So any number above 0 would mean it missing energy and thats why the validator should work.
Since both validators are in the search area effect all it validates for is that the point/unit you cast the search area effect on if it has energy. Using a combine validator would combine counting if there are enough units in the area and if they also have enough energy.
i generally use the validators on the effects that the search effect kicks off.
This is because the "search doesnt exactly have a target is my understanding" where as the effects the search kicks off has a specific target of what the search as found.
Refine your search so it can weed out as much as possible through .... unit attributes and player properties as possible
On the effect that the Search kicks off use a validator to verify that it is actually a "valid" target.
I may be wrong here but this is how I generally handle it.
I know you can use a validator to validate the caster unit on the search effect, I just dont think you can apply the validator to the targets the search picks out.
In short, i'm making a building restore energy to another building.
The validator is simple, i dont want it to target a building who have full energy and add energy to it. It would be a wasted effect. However what Kueken531 says might fix that! If it can choose the targets who have the least amount of energy then it would never give energy to a target who have full energy over a target who dont have full energy.
How should i set it like i want it to make it work? Never done this part before (sorting targets)
sounds good, have you tried it? You could have a look at the Target Sorts data type, to see, how TSEnergy sorts. Its probably by absolute energy and not energy missing, so this configuration would prefer a 100/100 over a 150/200 unit.
I don't know if you have this figured out or not, but I will tell you what I do.
Not only is it a relatively simple validator, Blizzard provides some for you. They are titled life < 1/2 HP, life > 0 Hp, and others like that.
Simply duplicate one of these validators, and change the vital to being energy.
Then, when that is done, change the desired percentage to be whatever you want. Also, make another duplicate, and set the type to "delta" instead of "fraction", and make sure that the amount of energy missing is above what you want. I think that is what delta does, I am not sure though.
Rollback Post to RevisionRollBack
Great to be back and part of the community again!
To post a comment, please login or register a new account.
I want to make a search area validator so that it only look for targets who does not have full energy but i seam to not be able to do so. My validator i made work if i add the validator to the effect that the unit get when its found but thats not how i want it.
This is the current validator i use but when i add it to the Effect - Validators for the search area effect then it does not work, in fact it make it so that i does not find any targets at all :/
As i understand it.
Delta = maximum - current value. So any number above 0 would mean it missing energy and thats why the validator should work.
Did you try this validator separately? Are you sure, this one is not working, or could the search area one be the broken one?
You could also try Percentage Energy < 1
@Kueken531: Go
If i remove this validator then the search area works.
If i add the validator to the effect applied by the search area then it works but is useless. I want to exclude all targets who have full energy.
Tried a combine validator?
Since both validators are in the search area effect all it validates for is that the point/unit you cast the search area effect on if it has energy. Using a combine validator would combine counting if there are enough units in the area and if they also have enough energy.
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
i generally use the validators on the effects that the search effect kicks off.
This is because the "search doesnt exactly have a target is my understanding" where as the effects the search kicks off has a specific target of what the search as found.
I may be wrong here but this is how I generally handle it.
I know you can use a validator to validate the caster unit on the search effect, I just dont think you can apply the validator to the targets the search picks out.
Depending on your desired usage, you could also try to use target sorts and sort by energy missing.
@Kueken531: Go
In short, i'm making a building restore energy to another building.
The validator is simple, i dont want it to target a building who have full energy and add energy to it. It would be a wasted effect. However what Kueken531 says might fix that! If it can choose the targets who have the least amount of energy then it would never give energy to a target who have full energy over a target who dont have full energy.
How should i set it like i want it to make it work? Never done this part before (sorting targets)
sounds good, have you tried it? You could have a look at the Target Sorts data type, to see, how TSEnergy sorts. Its probably by absolute energy and not energy missing, so this configuration would prefer a 100/100 over a 150/200 unit.
@Kueken531: Go
Hm ts energy fraction would maybe be better then because then it worst by % missing i think?
I tried it with tsenergy and it took the target with the least amount of energy out of 7 identical targets with same max energy.
@Sherlia: Go
I don't know if you have this figured out or not, but I will tell you what I do.
Not only is it a relatively simple validator, Blizzard provides some for you. They are titled life < 1/2 HP, life > 0 Hp, and others like that.
Simply duplicate one of these validators, and change the vital to being energy.
Then, when that is done, change the desired percentage to be whatever you want. Also, make another duplicate, and set the type to "delta" instead of "fraction", and make sure that the amount of energy missing is above what you want. I think that is what delta does, I am not sure though.
Great to be back and part of the community again!