Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local color_list_proj = {rgb(255, 0, 0), rgb(255, 127, 0), rgb(255, 255, 0), rgb(127, 255, 0),
- rgb(0, 255, 0), rgb(0, 255, 127), rgb(0, 255, 255), rgb(0, 127, 255),
- rgb(0, 0, 255), rgb(127, 0, 255), rgb(255, 0, 255), rgb(255, 0, 127)} -- Colors from Ensis' rainbow damage numbers
- local color_idx_proj = 0 --index of which color the new projectile will have
- local color_idx_proj_timer = 0 --timer to get a 10 millisecond delay
- function onDamageNumberUpdate(dam_nums, hud, delta) --onDamageNumberCreate(dam_nums, number, loc, is_shield)
- --onDamageNumberUpdate code from a damage number script
- if color_idx_proj_timer == 9 then --checks if color_idx_proj_timer equals 9 (10 ms as it starts at 0)
- color_idx_proj_timer = 0 --set color_idx_proj_timer to 0
- if color_idx_proj == 12 then --checks if color_idx_proj is equal 12
- color_idx_proj = 0 --changes value back to 0 if true
- else
- color_idx_proj = color_idx_proj + 1 --increases the value of color_idx_proj by 1 if false
- end
- local valc = color_list_proj[color_idx_proj % 12 + 1] --sets the value of valc to the current color from color_list_proj
- setProjectileColor(getProjectile("SLD", "AR"), valc, 10) --sets projectile color
- setProjectileColor(getProjectile("SLD", "Thumper DX"), valc, 10)
- else
- color_idx_proj_timer = color_idx_proj_timer + 1 --increases the value of color_idx_proj_timer by 1
- do return end --exits the function
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment