After testing some more I noticed that it was and could sometimes STILL fire multiple times. Usually when being attacked by a ranged and melee @ the same time. So changing the "No Multiple Fires" variable to a global variable and then adding the variable check in the base trigger condition did the trick. No more multi-fires!
Here you go ppl:
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
Gotta say this saved me tons of time and helped me out. It was, however, confusing because it wasn't working right until I found this unlinked post and fixed the system.
My revised version of your trigger:
ReviveHeroEventsUnit-AnyUnittakesFatalorNon-FatalAnydamage(fromAnyeffects)LocalVariablesNoMultipleFires=false<Boolean[6]>DieingHero=(Triggeringunit)<Unit>KillingHero=(Damagingunit)<Unit>Actor=NoActor<Actor>GoldAmountTotal=0<Integer>GoldAmountLost=0<Integer>GoldAmountTransfered=0<Integer>ConditionsAndConditions((UnittypeofDieingHero)isHero)==true(DieingHerohasValerian02a-Incapacitated)==trueActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)IfNoMultipleFires[(OwnerofDieingHero)]==falseThenVariable-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.0GameTimesecondsUnit-MoveDieingHeroinstantlytoTerranHeroRevive(NoBlend)Actor-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)Camera-Panthecameraforplayer(OwnerofDieingHero)toTerranHeroReviveover1.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningUnitSelection-SelectDieingHeroforplayer(OwnerofDieingHero)Variable-SetNoMultipleFires[(OwnerofDieingHero)]=falseElse
This heals your hero before you can see him to full. It also subtracts 25% of your gold and transfers a third of that amount to the killing player.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
After testing some more I noticed that it was and could sometimes STILL fire multiple times. Usually when being attacked by a ranged and melee @ the same time. So changing the "No Multiple Fires" variable to a global variable and then adding the variable check in the base trigger condition did the trick. No more multi-fires!
Here you go ppl:
Gotta say this saved me tons of time and helped me out. It was, however, confusing because it wasn't working right until I found this unlinked post and fixed the system.
My revised version of your trigger:
This heals your hero before you can see him to full. It also subtracts 25% of your gold and transfers a third of that amount to the killing player.