@name GuitarHeroHit @inputs Hit HitScreen:wirelink @persist HitDone Width Height @trigger Hit if (first()) { HitScreen[1048574] = 1 # Clear HitScreen[1048569] = 1 # RGB Mode Width = 16 Height = 16 HitDone = 0 } interval(500) if (HitDone) { HitScreen[1048574] = 1 # Clear HitDone = 0 } if (inputClk()) { if (Hit > 0) { for (I = 5, Width - 3) { # bottom left to top right HitScreen[(I + ((Width - I - 1) * Width)) * 3] = 255 HitScreen[(I + ((Width - I - 1) * Width)) * 3 + 1] = 255 HitScreen[(I + ((Width - I - 1) * Width)) * 3 + 2] = 0 } HitScreen[(5 - 1 + ((Width - 5 - 1 - 1) * Width)) * 3] = 255 HitScreen[(5 - 1 + ((Width - 5 - 1 - 1) * Width)) * 3 + 1] = 255 HitScreen[(5 - 1 + ((Width - 5 - 1 - 1) * Width)) * 3 + 2] = 0 HitScreen[(5 - 2 + ((Width - 5 - 1 - 2) * Width)) * 3] = 255 HitScreen[(5 - 2 + ((Width - 5 - 1 - 2) * Width)) * 3 + 1] = 255 HitScreen[(5 - 2 + ((Width - 5 - 1 - 2) * Width)) * 3 + 2] = 0 HitScreen[(5 - 3 + ((Width - 5 - 1 - 3) * Width)) * 3] = 255 HitScreen[(5 - 3 + ((Width - 5 - 1 - 3) * Width)) * 3 + 1] = 255 HitScreen[(5 - 3 + ((Width - 5 - 1 - 3) * Width)) * 3 + 2] = 0 #entity():soundPlay(1, 1, "buttons/blip1.wav") } else { for (I = 2, Width - 2) { # top left to bottom right HitScreen[(I + ((I-1) * Width)) * 3] = 255 HitScreen[(I + ((I-1) * Width)) * 3 + 1] = 0 HitScreen[(I + ((I-1) * Width)) * 3 + 2] = 0 } for (I = 2, Width - 2) { # bottom left to top right HitScreen[(I + ((Width - I - 1) * Width)) * 3] = 255 HitScreen[(I + ((Width - I - 1) * Width)) * 3 + 1] = 0 HitScreen[(I + ((Width - I - 1) * Width)) * 3 + 2] = 0 } #entity():soundPlay(1, 1, "common/wpn_hudoff.wav") } HitDone = 1 }