Make an ability of type Effect - Instant.
Make a custom button if you want.
Make an effect of type Remove Behaviour.
I assume you already have created the poison behaviour.
Have the Effect - Instant ability target the caster (Unit-Target) and assign the effect under (Effect-Effect). And set the desired button for Execute under (Commands+).
The effect should have (Unit-Unit+) set to caster, the (Behaviour-Behaviours) should be the posion. Obviously.
Edit the Unit's commandcard and add the ability. Voila, you're done.
This is the most basic setup i can imagine for this.
You could fiddle around with requirements, so the unit could only use the antidote when it's actually applied. Or make the antidote remove several other behaviours multiple times. Whatever.
Edit: I attached a testmap to show you what i mean. Note: Except for the requirements, this is all basic stuff. For visuals and sounds, you'll have to create actors and fiddle around with them.
If you don't want the damage to be dealt when the behaviour is applied, simply delete the damage effect from the behaviour field (Effect-Initial). But i guess you already knew that.
Hey all i want to make a ability which removes a behavior however im not sure how to do this as im not a data editor.
This one's quite easy actually.
Make an ability of type Effect - Instant.
Make a custom button if you want.
Make an effect of type Remove Behaviour.
I assume you already have created the poison behaviour.
Have the Effect - Instant ability target the caster (Unit-Target) and assign the effect under (Effect-Effect). And set the desired button for Execute under (Commands+).
The effect should have (Unit-Unit+) set to caster, the (Behaviour-Behaviours) should be the posion. Obviously.
Edit the Unit's commandcard and add the ability. Voila, you're done.
This is the most basic setup i can imagine for this.
You could fiddle around with requirements, so the unit could only use the antidote when it's actually applied. Or make the antidote remove several other behaviours multiple times. Whatever.
Edit: I attached a testmap to show you what i mean. Note: Except for the requirements, this is all basic stuff. For visuals and sounds, you'll have to create actors and fiddle around with them.
If you don't want the damage to be dealt when the behaviour is applied, simply delete the damage effect from the behaviour field (Effect-Initial). But i guess you already knew that.