Hi there, okay I'm having a little fun doing a 2D style Guitar hero and I've come accross a few snags, the first one is key states, I'm using this code in the button container to detect a strum as in the key was pressed down and the threat struck.
This only kind of works, it works if you have the F1 pressed down and strumm the Enter but also if you have the Enter down and strum the F1?
The second problem is a note being hit variable, so if a button object successfully strumms a note object it reconds true, else if it strums nothing return false, but it return false regardless.
I think I am doing something wrong there though :/
Thanks :)
If(m_pressed And KeyHit(KEY_ENTER)) m_strummed = True; Else m_strummed = False; EndIf
This only kind of works, it works if you have the F1 pressed down and strumm the Enter but also if you have the Enter down and strum the F1?
The second problem is a note being hit variable, so if a button object successfully strumms a note object it reconds true, else if it strums nothing return false, but it return false regardless.
For Local n:Note = EachIn note_list If RectsOverlap(m_x, m_y, 45, 45, n.m_x, n.m_y, 45, 45) And m_strummed = True m_hitNote = 1 Else If Not RectsOverlap(m_x, m_y, 45, 45, n.m_x, n.m_y, 45, 45) And m_strummed = True m_hitNote = 0 EndIf next
I think I am doing something wrong there though :/
Thanks :)