doru90

dando

Jan 15th, 2022 (edited)
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. on gun shoot:
  2. set {_projectile} to event-projectile
  3. add {_projectile} to {gun::crackshotBullets::*}
  4. set {gun::lastLoc::%{_projectile}%} to {_projectile}'s location
  5.  
  6. every tick:
  7. set {_uuidList} to "%all entities' uuid%"
  8. loop {gun::crackshotBullets::*}:
  9. if {_uuidList} contains loop-value's uuid:
  10. blueline(loop-value's location, {gun::lastLoc::%loop-value%}, 1)
  11. set {gun::lastLoc::%loop-value%} to loop-value's location
  12. else:
  13. delete {gun::crackshotBullets::%loop-index%}
  14. delete {gun::lastLoc::%loop-value%}
  15.  
  16. function blue(a:location, b:location, n:number):
  17. if {_n} isn't 1:
  18. loop {_n} times:
  19. set {_v} to vector from {_a} to {_b}
  20. set vector length of {_v} to vector length of {_v} / ({_n}-1) * (loop-number - 1)
  21. show crit on {_a} ~ {_v}
  22. else:
  23. show crit on {_a}
  24.  
  25. function blueline(a:location, b:location, i:number):
  26. set {_d} to distance between {_a} and {_b}
  27. set {_n} to round({_d} / {_i})
  28. blue({_a}, {_b}, {_n} + 1)
Add Comment
Please, Sign In to add comment