There are 2 validator in this map "Caster Behind Target" & "Caster In front of Target". I did them by data editor.
The key point is: use CValidatorLocationEnumArea to enum front area of Target, see if there is a Caster.
In this example map, you can snipe target when you behind it. And if you infront of the target, there will be a error message "Must behind the target."
Wow, mybe I should post it to the Data forum, Im not sure.
Note the CValidatorLocationEnumArea will return false when find 0 unit, so check if the enum result count is 0 will alaways returns false. So you need to atleast make it return 1 result. In this map, I use a addional area to do this.
Note <IncludeArray/> is need! This will make Caster pass the enum filter. Else you will get 0 units, since <SearchFilters value="-;Player,Ally,Neutral,Enemy"/> excluded everything.
<IncludeArray/> equ to <IncludeArray Value="Caster" />
Could this be used to validate spells such as flash bang or other such blinding effects (E.G. Spell/Target)? Or would this only work with Caster/Target (E.G. your example)?
For example, checks if "victem" was facing the flash grenade. Then puts a miss debuff on the target.
Would it be possible to do something like in the picture below? I want to check if there are enemies within the red areas. The angle between the checked areas is 72 degrees.
Do you know how you could alter this to have the opposite effect? im trying to mak a "tail whip" ablity for a boss in one of my maps, and im having trouble making the search area target whats behind him. with this i could use a 360 arc, an just make it only pick the units that also fall under the behind the caster validator
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
There are 2 validator in this map "Caster Behind Target" & "Caster In front of Target". I did them by data editor.
The key point is: use CValidatorLocationEnumArea to enum front area of Target, see if there is a Caster.
In this example map, you can snipe target when you behind it. And if you infront of the target, there will be a error message "Must behind the target."
Wow, mybe I should post it to the Data forum, Im not sure.
Note the CValidatorLocationEnumArea will return false when find 0 unit, so check if the enum result count is 0 will alaways returns false. So you need to atleast make it return 1 result. In this map, I use a addional area to do this.
Raw XML:
Note <IncludeArray/> is need! This will make Caster pass the enum filter. Else you will get 0 units, since <SearchFilters value="-;Player,Ally,Neutral,Enemy"/> excluded everything.
<IncludeArray/> equ to <IncludeArray Value="Caster" />
Could this be used to validate spells such as flash bang or other such blinding effects (E.G. Spell/Target)? Or would this only work with Caster/Target (E.G. your example)?
For example, checks if "victem" was facing the flash grenade. Then puts a miss debuff on the target.
Since CValidatorLocationEnumArea could only enum Units, you need to create a dummy unit in the point where grenade explode then use this.
And you need to modify IncludeArray to the created unit.
Would it be possible to do something like in the picture below? I want to check if there are enemies within the red areas. The angle between the checked areas is 72 degrees.
Gonna use this to add flanking bonuses to my mod, this is really cool.
Do you know how you could alter this to have the opposite effect? im trying to mak a "tail whip" ablity for a boss in one of my maps, and im having trouble making the search area target whats behind him. with this i could use a 360 arc, an just make it only pick the units that also fall under the behind the caster validator