Im trying to make an ability that has one effect if you target a unit (it applies a behaviour), and one effect if you target the ground (it creates a unit).
Im not very accustomed to switches, so im not really sure what type of validator to use and i dont want the behaviour to be applied anywhere else. So wouldnt the best way be to make sure that the behviour is only applied if its a unit? Any ideas?
hello Sendlirn, the Validator you are looking for is the Unit Order Target Type. you can create a switch effect that uses this validator as a test that the target of the ability and command specified is a unit or not. the switch then would then have the create unit ( or other Point targeted effect) as the default effect and the apply behavior (or other unit targeted effect) in a case validated by the Unit Order Target Type. i have attached a map that demonstrates this method.
Thanks for the reply, and thanks alot for the demostration map vailreth. Ive tried to implement it, but since im using a missile, it doesnt seem to work, i think its because the order might be executed already when the missile has arrived (giving me the same result, "negative" every time).
I guess i could make two distinct effect trees from the start (if i cant find another way) and go from there. So i guess the idea will be to distinguish first if im targeting a point or a unit, and then effects after that depending on what i want.
But if theres any other way that it could be solved i would be happy to try them. The effect building up to the unit creation or the behaviour is fairly complex, so it would be preferable if there was one way to disern if i targeted a unit or a point in the end, rather than re-create the effect tree from scratch (to disern in the beginning).
it may be possible to emulate the effect of the Unit Order Target Type Validator with a custom Enumerate Area Validator using a small search area. without knowing a bit more i can't say for sure though. if you feel comfortable explaining the effects of your ability a bit better i would love to help more.
I think masked imposter's comment about needing to put the validator before the missile is launched solved the whole thing.
I still need to rework the effect chain and split them, but in the end hopefully it will be worth it.
Thanks to you both!
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Im trying to make an ability that has one effect if you target a unit (it applies a behaviour), and one effect if you target the ground (it creates a unit).
Im not very accustomed to switches, so im not really sure what type of validator to use and i dont want the behaviour to be applied anywhere else. So wouldnt the best way be to make sure that the behviour is only applied if its a unit? Any ideas?
Your help is appriciated, and will be credited :)
hello Sendlirn, the Validator you are looking for is the Unit Order Target Type. you can create a switch effect that uses this validator as a test that the target of the ability and command specified is a unit or not. the switch then would then have the create unit ( or other Point targeted effect) as the default effect and the apply behavior (or other unit targeted effect) in a case validated by the Unit Order Target Type. i have attached a map that demonstrates this method.
@vailreth: Go
Thanks for the reply, and thanks alot for the demostration map vailreth. Ive tried to implement it, but since im using a missile, it doesnt seem to work, i think its because the order might be executed already when the missile has arrived (giving me the same result, "negative" every time).
I guess i could make two distinct effect trees from the start (if i cant find another way) and go from there. So i guess the idea will be to distinguish first if im targeting a point or a unit, and then effects after that depending on what i want.
But if theres any other way that it could be solved i would be happy to try them. The effect building up to the unit creation or the behaviour is fairly complex, so it would be preferable if there was one way to disern if i targeted a unit or a point in the end, rather than re-create the effect tree from scratch (to disern in the beginning).
@Sendlirn: Go
Yea, you'd probably need to have the switch effect happen before the launch missile effect, so you'll essentially need two effect chains.
it may be possible to emulate the effect of the Unit Order Target Type Validator with a custom Enumerate Area Validator using a small search area. without knowing a bit more i can't say for sure though. if you feel comfortable explaining the effects of your ability a bit better i would love to help more.
@vailreth: Go
I think masked imposter's comment about needing to put the validator before the missile is launched solved the whole thing. I still need to rework the effect chain and split them, but in the end hopefully it will be worth it.
Thanks to you both!