This should be a simple thing but I can't get it to work. I just need a trigger to fire on a unit every time they use the behavior Hero Death Prevention.
Need a little more information. Do you mean they carry the behavior? You can't "use" a behavior. Also what do you mean by "on a unit?" do you mean every time any unit gets the behavior, a specific other unit does something, or any time a unit gets the behavior, that particular unit does something?
Depending on what your "do stuff" is, this might be much more efficient if done through data. Again, need more information.
"Do stuff" - is to simply move the hero to a target location. I know the problem in in the Event/Conditions because I stuck a chat message in the action so I can tell if it makes it that far.
The Heros do carry the behavior and it functions correctly when they die. I just need to move the hero to a specific point after the behavior triggers.
Unit Takes Damage might be a more appropriate event, but your condition should be "Triggering Unit Has Behavior," not "Triggering behavior = X." Depending on how you're working the buffs, you might want to have the Hero Death Prevention behavior add another behavior as part of its effects and check for that behavior, since Hero Death Prevention could conceivably be on a unit at all times...
Just keep in mind that depending on how often the event would fire, it might be more efficient from a system resources standpoint to create a loop that periodically checks conditions rather than relying on a more resource-intensive event.
That can work but it causes the trigger to fire each time the unit takes damage. I only want the trigger to fire if the damage results in Hero death prevention activating.
How would I go about attaching an attribute i made called death to hero death prevention? I tried it through the behavior modification tab but it isn't working
Are you using the default campaign Hero Death Prevention behavior?
This behavior runs an effect when the unit takes fatal damage (damage that kills it).
Using the event "Effect used" should help you here (the effect in this case would be "Valerian02a - Apply Incap Behavior").
This should be a simple thing but I can't get it to work. I just need a trigger to fire on a unit every time they use the behavior Hero Death Prevention.
Right now I have,
Event
Unit attribute changes
Condition
Triggering behavior = hero death prevention
Action
Do Stuff
@jstoffer: Go
Need a little more information. Do you mean they carry the behavior? You can't "use" a behavior. Also what do you mean by "on a unit?" do you mean every time any unit gets the behavior, a specific other unit does something, or any time a unit gets the behavior, that particular unit does something?
Depending on what your "do stuff" is, this might be much more efficient if done through data. Again, need more information.
<Click Here> To See My Epic Single Player Campaign (LifeForceCampaign.com)
@Bilxor: Go
"Do stuff" - is to simply move the hero to a target location. I know the problem in in the Event/Conditions because I stuck a chat message in the action so I can tell if it makes it that far.
The Heros do carry the behavior and it functions correctly when they die. I just need to move the hero to a specific point after the behavior triggers.
Unit Takes Damage might be a more appropriate event, but your condition should be "Triggering Unit Has Behavior," not "Triggering behavior = X." Depending on how you're working the buffs, you might want to have the Hero Death Prevention behavior add another behavior as part of its effects and check for that behavior, since Hero Death Prevention could conceivably be on a unit at all times...
Just keep in mind that depending on how often the event would fire, it might be more efficient from a system resources standpoint to create a loop that periodically checks conditions rather than relying on a more resource-intensive event.
Hope that helps.
@BasharTeg: Go
That can work but it causes the trigger to fire each time the unit takes damage. I only want the trigger to fire if the damage results in Hero death prevention activating.
How would I go about attaching an attribute i made called death to hero death prevention? I tried it through the behavior modification tab but it isn't working
Are you using the default campaign Hero Death Prevention behavior? This behavior runs an effect when the unit takes fatal damage (damage that kills it). Using the event "Effect used" should help you here (the effect in this case would be "Valerian02a - Apply Incap Behavior").