Rhythm game help
Posted: Sat May 21, 2016 1:35 am
im making a rhythm game(like Guitar Hero, Rockband etc.) and when it comes the the white bar it(where the "notes" are detected) only makes the hit counter go down -1 and i scripted a variable that detect whether the note is colliding with the white bar so my script is as follows:
This did have the variable change to 1 when the note was touching the white bar, this is the script that for some reason does not work:
I will provide all my scripts to help find the problem(s), i cant compile them, sorry. If you can, note where i went wrong thanks!
Code: Select all
if collision:detect(note.x, note.y, note.w, note.h, notehit.x, notehit.y, notehit.w, notehit.h) then
note.TouchingHitter = 1
else
note.TouchingHitter = 0
end
end
This did have the variable change to 1 when the note was touching the white bar, this is the script that for some reason does not work:
Code: Select all
if note.TouchingHitter == 0 and love.keyboard.isDown("e") then
note.hits = note.hits - 1
if note.TouchingHitter == 1 and love.keyboard.isDown("e") then
note.hits = note.hits + 1
end
end
end