Advertisement
Tkap1

Untitled

Oct 25th, 2022 (edited)
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. when skill used:
  2. timePassed = 0
  3.  
  4. every frame:
  5. timePassed += delta;
  6.  
  7. if timePassed >= duration:
  8. remove buff or whatever
  9.  
  10. if timePassed >= cooldown:
  11. we can use again
  12.  
  13. how long until skill ends = duration - timePassed
  14. how long until we can use again = cooldown - timePassed
  15. how far % wise into duration are we = timePassed / duration
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement