Hello,
When you say "they need to HIT a letter" I'm assuming that they need to move some object on the screen (a target or something) onto or through a letter object that is on the screen.
You can return either the state of collision between two objects or you can return the number of the object colliding with a specified object. You would be interested in the latter.
Since each letter is its own object number, it is that number that you will want to test for. You would need to keep track of the correct sequence of letters (1-26 for example) so you know which one you are testing for at any given moment.
When that particular number is to be tested, you call a collision routine between the target object and zero to return the object number the target is colliding with.
The values in the following code are for demo purposes. You would use whatever object numbers that you assign in your program:
currentLetter=0
targetobj=27
matched=0
rem insert your routine that would randomly place letters
rem all over the screen
gosub _place_letters
rem advance the sequence to test by 1
inc currentletter
do
rem a loop to test if the current letter is matched
while matched=0
rem this would be a routine to move the target around
gosub _move_target
rem test the collision here against the trget and see which letter
rem by using the target number and the number zero, we can
rem return the object number that is being collided with.
rem if it's not our object in the current sequence - i.e.
rem if it's not the next letter in order, don't do anything.
rem if it is the correct letter break out of the loop and
rem advance the sequence
hittingobject=object collision(targetobj,0)
rem test the hittingobject against the current letter in sequence
if hittingobject = currentletter
matched=1
endif
endwhile
rem we've escaped the loop because we collided with the correct letter
rem reset matched to zero and increment to the next letter
matched=0
inc currentletter
rem we want to test if the current letter is beyond the range of letter objects
if currentletter > maxletters
rem do something
endif
loop
Enjoy your day.