I'm not sure if this is a Data problem or a Trigger problem.
I've followed OneTwo's New Hero Revival video tutorials and . My hero will die then revive at it's designated spawn location when killed by melee units (Zerglings) and ranged units that do instant damage (Marines), but when "killed" by a unit shooting a projectile (Roach, Hydralisk, or Stalker) it will instead become incapacitated at that location then become controllable again after a 20second delay.
Why are projectile damage sources acting different than instant damage sources and how would I go about changing them?
first of all.... why are you using the "any unit attacked" event rather then "any unit dies"
second.... why in the death trigger do you have "incapacitated = true"
what is the point of the incapacitated behavior?
do you handle any of the damage to the hero through triggers?
also .... your unit dies trigger is running twice after the unit is dead as you can see from your "unit will revive in 15 seconds message" it appears twice .... I suggest you verify the the trigger has not already run using a boolean variable for each player
also when they die to range you will notice the hp bar shows that the unit still has health...... so something obviously is running out of order..... maybe we need to see more of your triggers.......
I believe you may be applying the incapacitated behavior at the wrong time..... which would cause exactly what your seeing because of the way your death trigger works.....
I cant help you but want to applaud you for the amount of information you provided, which is rare. ^_^
I second that ;)
The event should indeed be the problem. It triggers, when the attack starts, not, when damage is caused. For instant damage weapons, both times align, making it work. But for every weapon with a delay involved, for example a projectile, the event will never trigger, after the unit actually died, and when the attack is initiated, the unit is not dead yet, so it doesn't have the incapacitated behavior.
Quote:
first of all.... why are you using the "any unit attacked" event rather then "any unit dies"
The unit technically doesn't die, and he doesn't revive it.
Quote:
second.... why in the death trigger do you have "incapacitated = true"
He checks, if the unit has the incapacitated behavior, which automatically gets applied, if the unit "died".
Quote:
what is the point of the incapacitated behavior?
It is the same behavior used for the Belly of the Beast mission. You use it, to prevent a unit from dying at all, it will remain alive and just be disabled for a couple of seconds.
Quote:
I believe you may be applying the incapacitated behavior at the wrong time..... which would cause exactly what your seeing because of the way your death trigger works.....
By the looks of it, it works exactly as intended.
I suggest, you either change the event to Unit takes damage or you allow the unit to die a regular death, and revive it using the ReviveUnit function.
Thank you all for your replies. Sorry if my method seems odd, or backwards, I'm very new to this so living off video tutorials and the such. I did my "player deaths" this way because not having any knowledge of creating inventories, I plan to do so and heard about having to make work-arounds due to items dropping on unit death, so I felt this method to be an "easier" way for players to retain their items when they "die" since they technically don't die.
Anyways, forum user, Zero0018 posted an updated version of the trigger based off OneTwo's tutorials (the one in OP) I followed.
His trigger looks like;
ReviveHeroEventsUnit-AnyUnittakesFatalorNon-FatalAnydamage(fromAnyeffects)LocalVariablesDieingHero=(Triggeringunit)<Unit>KillingHero=(Damagingunit)<Unit>Actor=NoActor<Actor>GoldAmountTotal=0<Integer>GoldAmountLost=0<Integer>GoldAmountTransfered=0<Integer>ConditionsAndConditions((UnittypeofDieingHero)isHero)==true(DieingHerohasValerian02a-Incapacitated)==trueNoMultipleFires[(OwnerofDieingHero)]==falseActionsVariable-SetNoMultipleFires[(OwnerofDieingHero)]=trueVariable-SetGoldAmountTotal=(Player(OwnerofDieingHero)Vespene)Actor-CreateactormodelProtossSpiritDeathatpoint(PositionofDieingHero)Actor-Sendmessage"AnimPlay Death Death"toactor(Lastcreatedactor)Variable-SetActor=(Lastcreatedactor)Unit-TurnDieingHeroHighlightablestateOffUnit-TurnDieingHeroCursorstateOffUnit-TurnDieingHeroSelectablestateOffUnit-TurnDieingHeroStatusBarstateOffUnit-TurnDieingHeroTooltipsstateOffActor-Sendmessage"SetMinimapVisibility"toactor(ActorforDieingHero)General-If(Conditions)thendo(Actions)elsedo(Actions)If(DieingHeroisselectedbyplayer(OwnerofDieingHero))==trueThenUnitSelection-Deselectallunitsforplayer(OwnerofDieingHero)ElseUI-Display(((Text(Nameof(UnittypeofDieingHero))withcolor(Color((Currentplayer(OwnerofDieingHero)color))))+" has been killed by ")+((Text(Nameofplayer(OwnerofKillingHero))withcolor(Color((Currentplayer(OwnerofKillingHero)color))))for(Allplayers)toSubtitleareaGeneral-Wait3.0GameTimesecondsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfOrConditions(OwnerofDieingHero)==(Player1fromPlayers=Terran)(OwnerofDieingHero)==(Player2fromPlayers=Terran)ThenUnit-MoveDieingHeroinstantlytoTerranHeroRevive(NoBlend)ElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfOrConditions(OwnerofDieingHero)==(Player1fromPlayers=Protoss)(OwnerofDieingHero)==(Player2fromPlayers=Protoss)ThenUnit-MoveDieingHeroinstantlytoProtossHeroRevive(NoBlend)ElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfOrConditions(OwnerofDieingHero)==(Player1fromPlayers=Zerg)(OwnerofDieingHero)==(Player2fromPlayers=Zerg)ThenUnit-MoveDieingHeroinstantlytoZergHeroRevive(NoBlend)ElseActor-Sendmessage"Destroy"toactorActorUnit-SetDieingHeroLife(Percent)to100.0Variable-SetGoldAmountLost=(GoldAmountTotal/4)Variable-SetGoldAmountTransfered=(GoldAmountLost/3)Player-Modifyplayer(OwnerofDieingHero)Vespene:SubtractGoldAmountLostUI-Display("You will revive in 20 seconds. You ..."+(("<c val="f2d560">"+(Text(GoldAmountLost)))+" gold!"))for(Playergroup((OwnerofDieingHero)))toSubtitleareaGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Controllerofplayer(OwnerofKillingHero))!=ComputerThenUI-Display("You recieved "+(("<c val="f2d560">"+(Text(GoldAmountTransfered)))+(" gold and "+("<c val="47d852">"+((Text((DieingHeroBounty(XP)(Default)))withAnyPrecisiondecimalplaces)+" experience!")))))for(Playergroup((OwnerofKillingHero)))toSubtitleareaPlayer-Modifyplayer(OwnerofKillingHero)Vespene:AddGoldAmountTransferedElseGeneral-Wait17.0GameTimesecondsUnit-TurnDieingHeroHighlightablestateOnUnit-TurnDieingHeroCursorstateOnUnit-TurnDieingHeroSelectablestateOnUnit-TurnDieingHeroStatusBarstateOnUnit-TurnDieingHeroTooltipsstateOnActor-Sendmessage"SetMinimapVisibility 1"toactor(ActorforDieingHero)General-If(Conditions)thendo(Actions)elsedo(Actions)IfOrConditions(OwnerofDieingHero)==(Player1fromPlayers=Terran)(OwnerofDieingHero)==(Player2fromPlayers=Terran)ThenCamera-Panthecameraforplayer(OwnerofDieingHero)toTerranHeroReviveover1.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfOrConditions(OwnerofDieingHero)==(Player1fromPlayers=Protoss)(OwnerofDieingHero)==(Player2fromPlayers=Protoss)ThenCamera-Panthecameraforplayer(OwnerofDieingHero)toProtossHeroReviveover1.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfOrConditions(OwnerofDieingHero)==(Player1fromPlayers=Zerg)(OwnerofDieingHero)==(Player2fromPlayers=Zerg)ThenCamera-Panthecameraforplayer(OwnerofDieingHero)toZergHeroReviveover1.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningElseUnitSelection-SelectDieingHeroforplayer(OwnerofDieingHero)Variable-SetNoMultipleFires[(OwnerofDieingHero)]=false
The only thing I can't seem to find in editor is;
NoMultipleFire[(OwnerofDieingHero)]==True
I am now getting the intended effects I was aiming for, but when a player is "killed" by a melee or instant damage ability, the "Respawn in 20 seconds..." message still triggers twice, but not when killed by a projectile. It's not a huge problem, but still curious why it's triggering twice.
He added some triggers for players exchanging money for killing an enemy, which I removed.
Again, I appreciate you guys responding. Frustration soothed...for now...
I did my "player deaths" this way because not having any knowledge of creating inventories, I plan to do so and heard about having to make work-arounds due to items dropping on unit death
This got fixed a couple of patches ago.
Quote:
Variable - Set No Multiple Fires[(Owner of Dieing Hero)] = false
The only thing I can't seem to find in editor is;
No Multiple Fire [(Owner of Dieing Hero)] == True
This is just a boolean variable array to prevent the double triggering.
Ahhh, I'm glad to see that was fixed. Maybe I'll redo my trigger to allow the player to actually die. May be easier and more manageable in the long run.
And thanks for pointing me to the variable.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I'm not sure if this is a Data problem or a Trigger problem.
I've followed OneTwo's New Hero Revival video tutorials and . My hero will die then revive at it's designated spawn location when killed by melee units (Zerglings) and ranged units that do instant damage (Marines), but when "killed" by a unit shooting a projectile (Roach, Hydralisk, or Stalker) it will instead become incapacitated at that location then become controllable again after a 20second delay.
Why are projectile damage sources acting different than instant damage sources and how would I go about changing them?
Video showing problem in-game.
Screenshot of Hero Death Trigger http://i.imgur.com/wC5CN.png
Screenshot of Data Incapacitate http://i.imgur.com/tZnIT.png
Any help would be much appreciated. I'm sorry if this is the wrong location, I'm not sure where the problem is. Thinking Data...
@chriachrias: Go
first of all.... why are you using the "any unit attacked" event rather then "any unit dies"
second.... why in the death trigger do you have "incapacitated = true"
what is the point of the incapacitated behavior?
do you handle any of the damage to the hero through triggers?
also .... your unit dies trigger is running twice after the unit is dead as you can see from your "unit will revive in 15 seconds message" it appears twice .... I suggest you verify the the trigger has not already run using a boolean variable for each player
also when they die to range you will notice the hp bar shows that the unit still has health...... so something obviously is running out of order..... maybe we need to see more of your triggers.......
I believe you may be applying the incapacitated behavior at the wrong time..... which would cause exactly what your seeing because of the way your death trigger works.....
I cant help you but want to applaud you for the amount of information you provided, which is rare. ^_^
I second that ;)
The event should indeed be the problem. It triggers, when the attack starts, not, when damage is caused. For instant damage weapons, both times align, making it work. But for every weapon with a delay involved, for example a projectile, the event will never trigger, after the unit actually died, and when the attack is initiated, the unit is not dead yet, so it doesn't have the incapacitated behavior.
The unit technically doesn't die, and he doesn't revive it.
He checks, if the unit has the incapacitated behavior, which automatically gets applied, if the unit "died".
It is the same behavior used for the Belly of the Beast mission. You use it, to prevent a unit from dying at all, it will remain alive and just be disabled for a couple of seconds.
By the looks of it, it works exactly as intended.
I suggest, you either change the event to Unit takes damage or you allow the unit to die a regular death, and revive it using the ReviveUnit function.
Thank you all for your replies. Sorry if my method seems odd, or backwards, I'm very new to this so living off video tutorials and the such. I did my "player deaths" this way because not having any knowledge of creating inventories, I plan to do so and heard about having to make work-arounds due to items dropping on unit death, so I felt this method to be an "easier" way for players to retain their items when they "die" since they technically don't die. Anyways, forum user, Zero0018 posted an updated version of the trigger based off OneTwo's tutorials (the one in OP) I followed.
His trigger looks like;
The only thing I can't seem to find in editor is;
I am now getting the intended effects I was aiming for, but when a player is "killed" by a melee or instant damage ability, the "Respawn in 20 seconds..." message still triggers twice, but not when killed by a projectile. It's not a huge problem, but still curious why it's triggering twice. He added some triggers for players exchanging money for killing an enemy, which I removed.
Again, I appreciate you guys responding. Frustration soothed...for now...
This got fixed a couple of patches ago.
This is just a boolean variable array to prevent the double triggering.
@Kueken531: Go
Ahhh, I'm glad to see that was fixed. Maybe I'll redo my trigger to allow the player to actually die. May be easier and more manageable in the long run. And thanks for pointing me to the variable.