I tried to make a cast bar in Gui, however it is still leaky, has many bugs, and I am confused on the approach to fix it.
It looks like this right now:
Will give rep to anyone who helps or even tries.
It looks like this right now:
-
Set Cast Bar
-

Events
-


Player - Player 1 (Red) skips a cinematic sequence
-
-

Conditions
-

Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




Casting[(Player number of (Triggering player))] Equal to True
-
-



Then - Actions
-




Floating Text - Destroy CastBar[(Player number of (Triggering player))]
-
-



Else - Actions
-
-


Set CastTime[NumofCastBars] = 3.00
-


Set NumOfTics[NumofCastBars] = 30
-


Set TicIntervil[NumofCastBars] = (CastTime[NumofCastBars] / (Real(NumOfTics[NumofCastBars])))
-


Set DisplayTics[NumofCastBars] = [
-


For each (Integer A) from 1 to NumOfTics[NumofCastBars], do (Actions)
-



Loop - Actions
-




Set DisplayTics[NumofCastBars] = (DisplayTics[NumofCastBars] + I)
-
-
-


Set DisplayTics[NumofCastBars] = (DisplayTics[NumofCastBars] + ])
-


Game - Display to (All players) the text: DisplayTics[NumofCastBars]
-


Set TempLoc = (Position of Hero[(Player number of (Triggering player))])
-


Floating Text - Create floating text that reads DisplayTics[NumofCastBars] at TempLoc with Z offset 0.00, using font size 7.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
-


Custom script: call RemoveLocation(udg_TempLoc)
-


Set CastBar[NumofCastBars] = (Last created floating text)
-


Set Casting[NumofCastBars] = True
-
-
Will give rep to anyone who helps or even tries.
Last edited:




