Im trying to add 500 to the players health (A) if the player wins the current battle. like say 1XX+500=6XX. ?

Anywho, Choice 7 is done. Will upload to site later.
adamac15 wrote:
Im trying to add 500 to the players health (A) if the player wins the current battle. like say 1XX+500=6XX. ?

Anywho, Choice 7 is done. Will upload to site later.
Soo, just If (conditional for winning):A+500->A ? That's all you'd need...
So just

If:A+500->A

next fight
A+500->A:XXX->B?
What's XXX?
like 500 or 849 or something like that.
Is it a variable or a constant?
constant (i think)
adamac15 wrote:
constant (i think)

A variable is something that changes, like the variables A to _theta_ and lists. A constant is a fixed value that doesn't change. If you are using a constant you wouldn't need XXX, you would need the constant. Smile
its the opponents health. every opponent start out at 1000 health.
Then you are referring to a variable, not a constant.
ok? so......
So instead of XXX->B, you would do C->B, or D->B, or E->B etc. You would use the variable where you are storing the value you want to put into B.
i understand that, but would i have to do that for A's health?
I don't think so... Does XXX affect A in any way?
no. actually i dont know why i said XXX. (B's health.) guess i wasnt thinking.

Ill post the code later. For clarity. And so you can actually see what im talking about.
If B is the enemy's health, and you have to reset the enemies health to 1000 for each match, then A+500->A:1000->B would do the trick.
i tried that with 1 (shortening the health till i figure this out) and it resets the next battles health to 500 instead of 501.
adamac15 wrote:
i tried that with 1 (shortening the health till i figure this out) and it resets the next battles health to 500 instead of 501.
Hmm, what do you mean? Can you post the code in question that has this behavior?
Ill post it when i get home (at school atm and i dont have enough time to manually type it in)
adamac15 wrote:
Ill post it when i get home (at school atm and i dont have enough time to manually type it in)
That's fine, take your time. I am concerned that you perhaps have less firm of a grasp on the fundamentals of TI-BASIC than is ideal, though; perhaps we can work on that at some point.
  
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
» Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
» View previous topic :: View next topic  
Page 5 of 7
» 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