Advertisement
Guest User

Untitled

a guest
May 24th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. finger = {
  2. index = {exists = true, colour = "blue", damage = 34, timer = 13}
  3. middle = {exists = true, colour = "blue", damage = 54, timer = 42}
  4. ring = {exists = true, colour = "blue", damage = 31, timer = 23}
  5. pinky = {exists = true, colour = "blue", damage = 94, timer = 70}
  6. }
  7.  
  8. function brokefingernail(nail)
  9. finger[nail].exists = false
  10. nailTimerEcho = nail
  11. tempTimer( finger[nailTimerEcho].timer-1,
  12. function()
  13. finger[nailTimerEcho].balance = true
  14. omni.echo("<cyan>"..nailTimerEcho:title() .." regrown!")
  15. end
  16. ]])
  17. end
  18.  
  19. Everytime a nail breaks, I went to trigger off it and then echo when it regrows. I am trying to make a general function for this so I don't have to c/p the timer for each trigger. However when I run this, and multiple fingernail break at once, the last thing that broke is echoed repeatedly, instead of each one in turn.
  20.  
  21. For example,
  22.  
  23.  
  24.  
  25. middle nail breaks,
  26.  
  27. Index nail breaks,
  28.  
  29. index regrows,
  30.  
  31. echo index regrows,
  32.  
  33. middle regrows,
  34.  
  35. echo index regrows.
  36.  
  37. , i want it to correct echo when the middle regrows.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement