http://calcg.org/newlogo2.png Not Logged in.
Login | Register

General Discussion Board \ Calculator Discussion \ Help please!

Click here to log in (you must be logged in to post comments).

AuthorComment
Lunchkin
Marine
Posted: 7 May 2004
12:59 GMT
Total Posts: 17
In a program I make, how do I show a persons health, equiptment, and money?

Also, if the character goes to a shop and buys something, how do I get that $ amount to be deducted from his total $$

Ex.

What do you want to buy?
Sword: 50$
Shield: 25$
Boomerang: 15$
Spear: 60$

You bought the Sword for 50$, you now how X$ left
Lunchkin
Marine
Posted: 7 May 2004
13:05 GMT
Total Posts: 17
Also, how could I make it so I can make a tank like figure for a game and when I press "X" it shoots something and destroyes something?

And how can I make enemies in a game?
PhilosopherEd
Goliath
Posted: 7 May 2004
13:35 GMT
Total Posts: 134
alright man, slow down. first of all give us some specs. what kind of calc do you have, do you want to use basic or asm? try reading some tutorials at this site, ticalc.org, and even your calc manual first. then ask us when you have a better idea of what you want.
Lunchkin
Marine
Posted: 7 May 2004
13:39 GMT
Total Posts: 17
Heh, sorry about all the questions. I got carried away. I have a Ti-83 Plus Silver Edition and I just wanna know the Basic way.

PhilosopherEd
Goliath
Posted: 7 May 2004
16:22 GMT
Total Posts: 134
first of all, you need to assign different variables to different things. (i.e. Health=H, Equipment=E, Money=M, etc.) the easiest way to make a shop is to make a menu game (which is what i assume you are doing). therefore, your program should look something like this:

100->H
50->M
LblA
Menu("Buy?","Sword 50",S,"Shield 25",H,"Boomerang 15",B,"Spear 60",P
End
Lbl S
M-50->M
Disp "You just bought the sword for 50 dollars
Disp "Money Remaining=
Disp M
Goto A
Lbl H
M-25->M
Disp "You just bought the shield for 25 dollars
Disp "Money Remaining=
Disp M
Goto A
etc.
etc.
etc.

the first two lines set your variables equal to whatever you want them to be in this case. the lbl A is just a reference point that you can use as sort of a loop to send the players wherever they want to go. in the menu, the first item "Buy?" is just a title for the top of the screen. the remaining items (i.e. "Sword 50", S) will send users to the specified label for whatever choice they want. in the label areas, you must specify a formula which you want the user to follow (if they buy a sword for 50 bucks, you subtract 50 from the money total). the disp function displays text or varible values. for words, you must use quotes, but to display the value which M equals, you simply put M. there are other factors in making a game of course (making it so they can't spend more than they have, making the displayed words short enough for one line, etc.) but this is the basic idea.
PhilosopherEd
Goliath
Posted: 7 May 2004
16:26 GMT
Total Posts: 134
to make a tank like figure, you need to design some graphics of your own. since you are using basic on a ti-83+, this means you are very very limited. the easiest thing to do is to use a letter as the shape of your tank. before this, you must master the getkey( function, the If Then Else And Or functions, and so much more. personally, i recommend that you make a menu-based game first to master the bare minimum things. after this, look at the source of another game and see if you can understand what it is saying. if so, try making something similar to it. tutorials and calcgames.org forums can help you get started with these sort of things, but we can't do it for you. some things you have got to master for yourself.
Lunchkin
Marine
Posted: 7 May 2004
18:32 GMT
Total Posts: 17
Thanks for your help

-Lunchkin





Portal | My Account | Register | Lost Password or Username | TOS | Disclaimer | Help | Site Search | File Archives Copyright © 2002-2019 CalcG.org