Right now I have an invisibility ability that has a validator attached to it. So if my unit "attacks" the behavior is removed. Which you think would work perfect EXCEPT it doesn't. If the player (while invisible) attack moves (i.e. "a" button and left click) the behavior is removed before he even attacks a unit.
I've been trying to find a validator that will only remove the behavior when the unit physically swings his weapon at an opponent
In the invisibility behavior, in the damage response field set chance to 1, location to attacker, and handled to a Remove Behavior effect that removes the invisibility behavior. As soon as your unit damages another unit its invisibility will be removed.
You could also use the damage response field to give a damage multiplier if you wanted a backstab-type effect.
You could always create a vaildator, simply bring up vaildators from the Data Type dropdown, now right click, add object, Name and ID anything you like but a good Name is IsFiringMyWeapon (where my weapon is your weaponname for example) and for type, select Unit Weapon Firing and click ok.
All you should have to change in the fields (make sure you have advanced values on to make sure you can find it!) is the Vaildator - Weapon field, change that to the same weapon type your unit has and then click ok. now add the vaildator and try it out. Vaildators are a pain, but there very powerfull, there just a pain to figure out. Remeber that this vaildator is basicly like saying (is <weapon> being fired from <target>) where target would be your unit and the weapon would be whatever you placed i nthe Weapon field. I will return true if it is being fired, false if its not.
I hope that helps, sorry if it's a bit rough or dosn't make sense, i'm getting tired heh.
You could always create a vaildator, simply bring up vaildators from the Data Type dropdown, now right click, add object, Name and ID anything you like but a good Name is IsFiringMyWeapon (where my weapon is your weaponname for example) and for type, select Unit Weapon Firing and click ok.
All you should have to change in the fields (make sure you have advanced values on to make sure you can find it!) is the Vaildator - Weapon field, change that to the same weapon type your unit has and then click ok. now add the vaildator and try it out. Vaildators are a pain, but there very powerfull, there just a pain to figure out. Remeber that this vaildator is basicly like saying (is <weapon> being fired from <target>) where target would be your unit and the weapon would be whatever you placed i nthe Weapon field. I will return true if it is being fired, false if its not.
I hope that helps, sorry if it's a bit rough or dosn't make sense, i'm getting tired heh.
Funny I tried that one and everytime I activate the ability that has that validator on it it freezes my game.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Right now I have an invisibility ability that has a validator attached to it. So if my unit "attacks" the behavior is removed. Which you think would work perfect EXCEPT it doesn't. If the player (while invisible) attack moves (i.e. "a" button and left click) the behavior is removed before he even attacks a unit.
I've been trying to find a validator that will only remove the behavior when the unit physically swings his weapon at an opponent
In the invisibility behavior, in the damage response field set chance to 1, location to attacker, and handled to a Remove Behavior effect that removes the invisibility behavior. As soon as your unit damages another unit its invisibility will be removed.
You could also use the damage response field to give a damage multiplier if you wanted a backstab-type effect.
@Etravex: Go
You could always create a vaildator, simply bring up vaildators from the Data Type dropdown, now right click, add object, Name and ID anything you like but a good Name is IsFiringMyWeapon (where my weapon is your weaponname for example) and for type, select Unit Weapon Firing and click ok.
All you should have to change in the fields (make sure you have advanced values on to make sure you can find it!) is the Vaildator - Weapon field, change that to the same weapon type your unit has and then click ok. now add the vaildator and try it out. Vaildators are a pain, but there very powerfull, there just a pain to figure out. Remeber that this vaildator is basicly like saying (is <weapon> being fired from <target>) where target would be your unit and the weapon would be whatever you placed i nthe Weapon field. I will return true if it is being fired, false if its not.
I hope that helps, sorry if it's a bit rough or dosn't make sense, i'm getting tired heh.
@RileyStarcraft: Go
Thank you guys!
Funny I tried that one and everytime I activate the ability that has that validator on it it freezes my game.