Hi
I made an Evasion Behaviour (Buff), with a Chance of 30 % to trigger.
What i want is that the Unit plays an animation when this happens. Is there any way to do this within Trigger Editor? (or data editor, allthough i need the Trigger anyway :D )
Hmm, i am not at home now to look how i did it exactly,
but i think i had simple Behaviour (Buff) with the Modification (Chance = 0.3, Modifie Damage =-100 ). The Behaviour itself works fine, reducing the triggering damage by 100 Points (i could hae used damage faction = 0 too)
But there is no visible indicator, WHEN it triggers. What i want is to play an animation of the evading unit whenever it evades. (or a Text Tag saying "evade" ). and for that i need the Event for an trigger. "unit has Behaviour" does not work, because it always does have the behaviour...
I even tried it with 2 triggers, the first one
Event : "when unit takes damage"
Condition : has "evade"
Action : Save triggering damage in Global Array Variable [Damage], and Save triggering unit
run "check Evade" (an action definition that does check
if [Damage] +0,5 > actuall HP of [Unit] and [Damage] -0,5 < actuall HP of [Unit]
then Play Animation
I can almost guarantee you that its not the most efficient way; but the way that I found to get abilities to activate triggers, is to give them another effect, that creates a dummy unit, thats invincible, has like... burrow collide only, has no weapon, and has the flag No Draw checked.
The trigger picks up when the unit is created and makes w\e you need.
The only real way I've found to let the data editor and trigger editor communicate is to make dummy units and upgrades for each to check.
Hi I made an Evasion Behaviour (Buff), with a Chance of 30 % to trigger. What i want is that the Unit plays an animation when this happens. Is there any way to do this within Trigger Editor? (or data editor, allthough i need the Trigger anyway :D )
well sure, but elaborate more as to how you set it up plz
Hmm, i am not at home now to look how i did it exactly, but i think i had simple Behaviour (Buff) with the Modification (Chance = 0.3, Modifie Damage =-100 ). The Behaviour itself works fine, reducing the triggering damage by 100 Points (i could hae used damage faction = 0 too)
But there is no visible indicator, WHEN it triggers. What i want is to play an animation of the evading unit whenever it evades. (or a Text Tag saying "evade" ). and for that i need the Event for an trigger. "unit has Behaviour" does not work, because it always does have the behaviour... I even tried it with 2 triggers, the first one
Event : "when unit takes damage" Condition : has "evade" Action : Save triggering damage in Global Array Variable [Damage], and Save triggering unit run "check Evade" (an action definition that does check if [Damage] +0,5 > actuall HP of [Unit] and [Damage] -0,5 < actuall HP of [Unit] then Play Animation
But that doesn work either :D
I can almost guarantee you that its not the most efficient way; but the way that I found to get abilities to activate triggers, is to give them another effect, that creates a dummy unit, thats invincible, has like... burrow collide only, has no weapon, and has the flag No Draw checked.
The trigger picks up when the unit is created and makes w\e you need.
The only real way I've found to let the data editor and trigger editor communicate is to make dummy units and upgrades for each to check.
hm I think you can add an effect to the Damage Response buff, can't you?
If so, make a new damage effect and set the damage to 0.
Then add this one to your buff.
In the trigger editor you can then do:
Event:
- Any unit takes damage through YourNewDamageEffect
Action:
- Play animation
@s3rius: Go
Yes, set the Handled field to a dummy effect. (What s3rius said.)
http://rileystarcraft.blogspot.com/2010/06/tutorial-create-custom-trigger-hooks.html
I think my problem was that i can´t add a damage effect to a passivly damage response behaviour, but i am not sure. I´ll try it when work is over ;)
@Niemetz:
All of these are too complicated.
Create an actor ModelAnimationStyleOneShot with the visual effect you desire, then under events add this:
Behavior.YourBehavior.DamageHandled
->Create
You can look at the "Shield Absorb Immortal Viz" actor as an example.
Thx for the help, got it to work nicely :D