Hello, i followed this tutorial on how to make something mui with waits, but this respawn system that i made apparently does not work properly. Did i do it wrong or is this just the wrong way of doing it?
Source: MUI Triggers with Waits
Source: MUI Triggers with Waits
-
A Hero Dies
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
-
Actions
-
Set VariableSet DyingHeroIndex = (DyingHeroIndex + 1)
-
Set VariableSet DyingHero[DyingHeroIndex] = (Triggering unit)
-
Set VariableSet DyingHero_ItemPoint = (Position of DyingHero[DyingHeroIndex])
-
Set VariableSet DyingHero_Point = (Position of DyingHero[DyingHeroIndex])
-
Item - Create Resurrection Flag at DyingHero_ItemPoint
-
Custom script: call RemoveLocation(udg_DyingHero_ItemPoint)
-
-
-
Resurrect Dead hero
-
Events
-
Unit - A unit Acquires an item
-
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to Resurrection Flag
-
-
Actions
-
Item - Remove (Item being manipulated)
-
Set VariableSet ReviveWriteIndex = (ReviveWriteIndex + 1)
-
Set VariableSet ReviveUnit[ReviveWriteIndex] = (Triggering unit)
-
Unit - Pause ReviveUnit[ReviveWriteIndex]
-
Wait 5.00 seconds
-
Set VariableSet ReviveReadIndex = (ReviveReadIndex + 1)
-
Unit - Unpause ReviveUnit[ReviveReadIndex]
-
Hero - Instantly revive DyingHero[DyingHeroIndex] at DyingHero_Point, Show revival graphics
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ReviveReadIndex Equal to ReviveWriteIndex
-
-
Then - Actions
-
Set VariableSet ReviveWriteIndex = 0
-
Set VariableSet ReviveReadIndex = 0
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_DyingHero_Point)
-
-
-
Self Resurrection
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
-
Actions
-
Set VariableSet DyingHero_SelfPoint = (Position of DyingHero[DyingHeroIndex])
-
Set VariableSet SelfResurrectionWriteIndex = (SelfResurrectionWriteIndex + 1)
-
Set VariableSet SelfResurrectionUnit[SelfResurrectionWriteIndex] = (Triggering unit)
-
Wait 40.00 seconds
-
Set VariableSet SelfResurrectionReadIndex = (SelfResurrectionReadIndex + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(SelfResurrectionUnit[SelfResurrectionReadIndex] is dead) Equal to True
-
SelfResurrectionReadIndex Equal to SelfResurrectionWriteIndex
-
-
Then - Actions
-
Hero - Instantly revive SelfResurrectionUnit[SelfResurrectionReadIndex] at DyingHero_SelfPoint, Show revival graphics
-
Set VariableSet SelfResurrectionReadIndex = 0
-
Set VariableSet SelfResurrectionWriteIndex = 0
-
-
Else - Actions
-
-
Custom script: call RemoveLocation(udg_DyingHero_SelfPoint)
-
-