I am in the midst of making a sharpshooter game, and had a few questions. First, is there a way to be counting down on a timer while using Input to get coords from the graph? I wanted the user to have a limited amount of time to aim.
No, there's no way to actively count down. You have two options:
1) Create your own input routine that doesn't use Input
2) Use the TI-84+/SE's clock functions to check the time before and after the Input command. This would limit the game to non-TI-83+ calculators, though, and would only let users know if they took too long after they finished aiming.
I'd recommend the first option.
Any idea how to do the custom input routine? (mind you, I'm using TI-BASIC)
ghest1138 wrote:
Any idea how to do the custom input routine? (mind you, I'm using TI-BASIC)
Yes, tons of ways! I could continue to plug my book, of course, but if you get it you'll see that I have plenty of examples of moving things around on the graphscreen. The basic premise is something like this:


Code:
starting_x_coord→A
starting_y_coord→B
Repeat K=105 //Repeat this loop until the user presses [ENTER]
//Draw some cursor, for example with PtChange:
Pt-Change(A,B
Pt-Change(A,B+1
Pt-Change(A,B-1
Pt-Change(A-1,B
Pt-Change(A+1,B
// Wait for a keypress
Repeat K
getKey→K
End
//Erase the cursor, for example with PtChange:
Pt-Change(A,B
Pt-Change(A,B+1
Pt-Change(A,B-1
Pt-Change(A-1,B
Pt-Change(A+1,B
//Handle the keypress
A+ΔX((K=26)-(K=24→A
B+ΔY((K=25)-(K=34→B
End
// Final coordinate will be in (A,B)
Sweet! I didn't think to use getKey >_<!
I made a program like this in casio basic... you can find it on casio-planet (its called rifle). I wouldn't recommend using code from it as it was my first major program and very unoptomized. (is that a word?)

Anyway, good luck!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement