KermMartian: Sorry. Seems I forgot the code for the arrow, and the syntax too. Silly me.
Mr. Potato Head AKA APotato: 10x26
Apotato: If I run the program you gave me it gives me a domain error. What should I do to fix this? When I goto error it brings me to the first output, Output(X,Y,"O. I thought maybe that was just because it didn't have any number to start out with. I tried storing 5 as x and 5 as y just to give it a number to start off with but then I got a domain error at Output(Q,W,"". I'm really not sure how to debug a program.... what I did to try to fix it maybe makes no sense but maybe could you tell me what I should do?
I believe that MateoConLechuga has the best code for your purpose (and for any movement).
In "Programming the TI-83 Plus/TI-84 Plus", Chapter 6 explains everything about the code to accomplish what you are trying to do. You can view a free sample of that chapter on the Manning website here.
DWMelon wrote:
Apotato: If I run the program you gave me it gives me a domain error. What should I do to fix this? When I goto error it brings me to the first output, Output(X,Y,"O. I thought maybe that was just because it didn't have any number to start out with. I tried storing 5 as x and 5 as y just to give it a number to start off with but then I got a domain error at Output(Q,W,"". I'm really not sure how to debug a program.... what I did to try to fix it maybe makes no sense but maybe could you tell me what I should do?

Right I did forget that...
Start off with 5->X and 5->Y and 6->Q and 6->W
Now it finally works! Smile I found out, when I read chapter six of KermM's book, that there was supposed to be a space inside of quotes of the Output(A,B," ". I never realized that there was a space there but KermM's book clarified that. Thanks for your help and sorry for claiming something didn't work when it really did but I just read it wrong.
Ah yayy! Very Happy Kerm's book saves the day! (of course -_-)
Now that I finally understand the "movement" piece of my movement game I want to make actual levels. I read on tifreakware.net that I can use matrices, but is there something else you would recommend that would work better?
I have gotten a small start (sort of) on a game I plan to make. I'm not sure what I'll call it or what it'll even be like. Right now you move around a "+" sprite and try to avoid the "X" sprite. I have set up a way to have the "X" follow you but I'm not sure if what I did was best.
Code:

1->A:1->B
5->C:5->D
ClrHome
Disp "AVOID THE X","OR DIE..","Os are portals","And you are +"
Pause
ClrHome
Output(10,26,"O
Repeat K=45
Output(A,B,"+
Output(C,D,"X
randInt(0,10)->E
getKey->K
If K
Output(A,B," "
If K=24 and B>1
B-1->B
If K=26 and B<26
B+1->B
If K=25 and A>1
A-1->A
If K=34 and A<10
A+1->A
Output(C,D," "
If C>A and E<5
C-1->C
If C<A and E<5
C+1->C
If D>B and E<5
D-1->D
If D<B and E<5
D+1->D
If A=C and B=D
Goto A
If A=10 and B=26
Goto B
End
Stop
Lbl A
ClrHome
Disp "YOU DIED!
Pause
Stop
Lbl B
Disp "LVL 2
Pause


I used the randInt command to slow down the "X" so that it doesn't instantly get to the "+" but I'm not sure if what I did is the best way to slow it down. Does anyone have any suggestions on how to change it/slow it down differently or if its ok already?
Is there a way to easily get hit detection on the graph screen? I read on tifreakware for the homescreen I could use matrices, lists, or strings, but is there anything like that I could use for the graphscreen?
I have another question: I want to make a program that will use sine, cosine, and tangent (I'm learning about this in math) to find side lenghts and angles of a triangle. The first problem I've run into is that I don't know how I can get input of multi digit numbers. Is there any way I can set up my program so that you can type in a set of numbers and store it as a variable? I think once I have the number as a variable then I can have the calculator choose if it should use cos, sin, or tan, and then calculate all possible side-lengths and angles. Thanks!

Also this doesn't really relate to the thread but I didn't think that I should make a whole new thread just for this...
Yes there is a way. Just use [Input (variable)] in your program without the brackets and the variable is the letter you want the number to get stored to (it's not permanent, you can change it). Hope this was helpful!
The Einstein wrote:
Yes there is a way. Just use [Input (variable)] in your program without the brackets and the variable is the letter you want the number to get stored to (it's not permanent, you can change it). Hope this was helpful!
The Einsten: I think that the [ mono ] tag we have might help you, like this: Input (variable). By the way, another option is the Prompt command:
Code:
Input "Enter A:",A
Prompt B
Disp A*B
Prompt C,D,E
Disp A+B+C+D+E
Thanks The Einstein and KermM. Is there a way to do this on the graph screen? I want to have a right triangle shown and then have the area highlighted for where you are inputing numbers and then when you are done you can hit enter or something like that to have it calculate all other sides/angles.
DWMelon wrote:
Thanks The Einstein and KermM. Is there a way to do this on the graph screen? I want to have a right triangle shown and then have the area highlighted for where you are inputing numbers and then when you are done you can hit enter or something like that to have it calculate all other sides/angles.
There's no pure BASIC way to do input on the homescreen, unless you write a routine yourself. One way you could do it is to use the TI-BASIC interfaces to the Doors CS GUI API to create a text input box, but that's only available on the monochrome calculators.
Or use ASCII characters!
  
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 3 of 3
» 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