Here is what I'm trying to accomplish and having little success (if you know how please enlighten me):
Event - A unit gains/loses a behavior
Condition - a specific behavior (unconsciousness)
Action - if each hero unit owned by player 1,2,3, and 4 has unconsciousness then end game in defeat.
I don't know how to set this up in the trigger editor, but this is what I'm looking for generally speaking. I have a map variant that If all 4 players are "unconscious" (which is my behavior) at the exact same time then the game I want to end in defeat. If anyone knows how to do this please let me know. I've been screwing around with this and can't figure it out.
for conditions i would do:
hero 1 uses behavior "unconscious"
and
hero 2 uses behavior "unconscious"
and
hero 3 uses behavior "unconscious"
and
hero 4 uses behavior "unconscious"
action: end game
as for event, i dont know if you want to use map initialization, or just check every 10 seconds. im guessing the 10 second check wouldnt "trigger lag" as much
Assuming you have this behaviour applied by an ability you could set the event to be "Unit Uses Ability". If it's being applied by a trigger then it's even easier; just append the check to whatever trigger is applying the behaviour.
The condition you want is "Unit Has Behaviour" with the unit set the each hero in turn and behaviour set to "Unconscious".
Well the way it currently works is the hero has a Death Prevention behavior (buff) which stops them from dying. When they take damage that would have killed them this then triggers the incapacitated effect, which applies the incapacitated buff.
What I wanted to do is be able to have a trigger based on that happening, so the unit isn't actually using an ability, and I don't think there is a way I can get them to "cast" and ability on near death either?
I really want the trigger so that I can handle the death animation a bit better. I can actually it with the actor and get it to play the death animation, but some units actually have an entirely separate model for the death animations - so playing the death animation on the main unit does nothing.
Triggers would have allowed me to handle it a bit better.
I'm not sure there's a built in trigger for behaviors. A periodic event may be used for this situation.
If that's done, just write in the condition field of the trigger each specific unit and a behavior count.
If all are true, it'll finish the code (the defeat).
Some units explode on death, throwing gibblets all over. This is usually why there is a seperate model for the death.
Just open the official blizzard map "into the beast" the 2nd to last mission for the campaign, thats what they have already, if all 4 heros have that buff, you lose.
Rollback Post to RevisionRollBack
Random Information
Tutorials - Map Development - Galaxy wiki
|Issues? PM me|
Yeah I've seen the way they do it, it's a bit different to how I want it though.
Also the problem with their version is that it uses the incapacitated animation, which VERY few units actually have.
I ended up doing similar to what they did but changing lots of things, and I use the death animation instead, this way more units have it. I had to create another effect and buff that was applied after a set time though, so that I could pause the death animation (to prevent the unit dissapearing through the ground).
I'm pretty happy with how it turned out, the only problem now being units that don't have the death animation on their main model. I can possibly work around this with actors events similar how they handle the death of these units, they actually replace the model with the one with the animation - so I should be able to do the same.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Here is what I'm trying to accomplish and having little success (if you know how please enlighten me):
Event - A unit gains/loses a behavior
Condition - a specific behavior (unconsciousness)
Action - if each hero unit owned by player 1,2,3, and 4 has unconsciousness then end game in defeat.
I don't know how to set this up in the trigger editor, but this is what I'm looking for generally speaking. I have a map variant that If all 4 players are "unconscious" (which is my behavior) at the exact same time then the game I want to end in defeat. If anyone knows how to do this please let me know. I've been screwing around with this and can't figure it out.
for conditions i would do:
hero 1 uses behavior "unconscious"
and
hero 2 uses behavior "unconscious"
and
hero 3 uses behavior "unconscious"
and
hero 4 uses behavior "unconscious"
action: end game
as for event, i dont know if you want to use map initialization, or just check every 10 seconds. im guessing the 10 second check wouldnt "trigger lag" as much
I cannot find a condition that resembles the "hero 1 uses behavior "unconscious" anywhere in the list of conditions. How do I find it?
Hmm I want to be able to detect this as well. Is something you can do in an actors events that will allow you to detect the event in normal triggers?
@KratsAU: Go
Assuming you have this behaviour applied by an ability you could set the event to be "Unit Uses Ability". If it's being applied by a trigger then it's even easier; just append the check to whatever trigger is applying the behaviour.
The condition you want is "Unit Has Behaviour" with the unit set the each hero in turn and behaviour set to "Unconscious".
Well the way it currently works is the hero has a Death Prevention behavior (buff) which stops them from dying. When they take damage that would have killed them this then triggers the incapacitated effect, which applies the incapacitated buff.
What I wanted to do is be able to have a trigger based on that happening, so the unit isn't actually using an ability, and I don't think there is a way I can get them to "cast" and ability on near death either?
I really want the trigger so that I can handle the death animation a bit better. I can actually it with the actor and get it to play the death animation, but some units actually have an entirely separate model for the death animations - so playing the death animation on the main unit does nothing.
Triggers would have allowed me to handle it a bit better.
I'm not sure there's a built in trigger for behaviors. A periodic event may be used for this situation.
If that's done, just write in the condition field of the trigger each specific unit and a behavior count.
If all are true, it'll finish the code (the defeat).
Some units explode on death, throwing gibblets all over. This is usually why there is a seperate model for the death.
Yeah I wanted to avoid too many periodic checks if possible.
Actually is there an event that will trigger on the "killing blow"?
Hmm there is an event that detects fatal damage on a unit - but I don't think there is anyway to stop the death occuring like you can with the buff.
Just open the official blizzard map "into the beast" the 2nd to last mission for the campaign, thats what they have already, if all 4 heros have that buff, you lose.
Yeah I've seen the way they do it, it's a bit different to how I want it though.
Also the problem with their version is that it uses the incapacitated animation, which VERY few units actually have.
I ended up doing similar to what they did but changing lots of things, and I use the death animation instead, this way more units have it. I had to create another effect and buff that was applied after a set time though, so that I could pause the death animation (to prevent the unit dissapearing through the ground).
I'm pretty happy with how it turned out, the only problem now being units that don't have the death animation on their main model. I can possibly work around this with actors events similar how they handle the death of these units, they actually replace the model with the one with the animation - so I should be able to do the same.