
02-18-2004, 03:59 PM
|
 |
Contributor
|
|
Join Date: Sep 2003
Location: Australia
Posts: 612
|
|
|
put the collision detect code into a sub and then call it from the timers because your keydown event isn't actually moving either pacman, all its doing is telling the timers to start moving the pacmans, this code will only be triggered when you actually press the key and so if it runs into the square when moving on its own it wont detect the collision, this is why it works when you click a key again while the pacmans are overlapped.
BTW, you may like to stay how it is but investigate using just 1 timer and having boolean values to see which way it is moving, if for no other reason than the timers wont all trigger at the same time
Edit: And use [vb][/vb] tags
|
__________________
"In The Land of The Blind the One-Eyed Man is King."
Jumentous
|