adamac15 wrote:
http://www.cemetech.net/forum/viewtopic.php?t=5165&start=0
here it is...youll have to go down the page a bit.
Or more specifically, to save scrolling: http://www.cemetech.net/forum/viewtopic.php?p=118937#118937 . And as suspected, that program includes DelVar A, which is more or less equivalent to 0-->A. Just change prgmA to use a variable other than A, or change your programs to use something other than A for the health. The former is probably easier than the latter.
i see. ill make the changes in SourceCoder since i dont have a calc right now. And ill post whether it works or not. Although it should.
Well now im having a problem with Y. It wants to stay at 0. ???

Heres the code:

Code:
:ClrHome
:AxesOff
:ZStandard
:ClrDraw
:Text(25,35,"LOADING")
:Shade({-}3,{-}1
:ClrHome
:ClrDraw
:1000→X:1000→Y
:DelVar CDelVar DWhile X>0 and Y>0
:Text(1,1,Str2+":",X)
:Text(16,1,"BRIGGS:",Y)
:Text(32,1,"HIT WHERE?")
:Text(40,1,"LOW=1 MID=2 HI=3")
:DelVar Z:Repeat Z=92 or Z=93 or Z=94
:randInt(1,3→D
:getKey→Z
:End
:ClrDraw
:If Z=92 and D=1
:Text(48,1,"BLOCKED")
:If Z=92 and D=2
:Then
:randInt(1,20→E
:X-E→X
:Text(48,1,"BRIGGS HITS")
:End
:If Z=92 and D=3
:Then
:randInt(1,20→E
:Y-E→Y
:Text(48,1,Str2+" HITS")
:End
:If Z=93 and D=1
:Then
:randInt(1,15→E
:Y-E→Y
:Text(48,1,Str2+" HITS")
:End
:If Z=93 and D=2
:Text(48,1,"BLOCKED")
:If Z=93 and D=3
:Then
:randInt(1,15→E
:X-E→X
:Text(48,1,"BRIGGS HITS")
:End
:If Z=94 and D=1
:Then
:randInt(1,10→E
:X-E→X
:Text(48,1,"BRIGGS HITS")
:End
:If Z=94 and D=2
:Then
:randInt(1,10→E
:Y-E→Y
:Text(48,1,Str2+" HITS")
:End
:If Z=94 and D=3
:Text(48,1,"BLOCKED")
:End
:ClrHome
:If X≤0 and Y≥0
:Then
:"BRIGGS WINS        GAME OVER
:prgmA
:ClrDraw
:AxesOn:Goto A
:End
:If Y≤0 and X≥0
:Then
:"YOU WIN   CONGRATS!
:prgmA
:ClrDraw
:AxesOn
:End
:Lbl G
:ClrHome
:AxesOff
:ZStandard
:Text(25,35,"LOADING")
:Shade({-}3,{-}1
:ClrHome
:ClrDraw
:X+491→X:1000→Y
:DelVar CDelVar DWhile X>0 and Y>0
:Text(1,1,Str2+":",X)
:Text(16,1,"TANK:",Y)
:Text(32,1,"HIT WHERE?")
:Text(40,1,"LOW=1 MID=2 HI=3")
:DelVar Z:Repeat Z=92 or Z=93 or Z=94
:randInt(1,3→D
:getKey→Z
:End
:ClrDraw
:If Z=92 and D=1
:Text(48,1,"BLOCKED")
:If Z=92 and D=2
:Then
:randInt(1,20→E
:X-E→X
:Text(48,1,"TANK HITS")
:End
:If Z=92 and D=3
:Then
:randInt(1,20→E
:Y-E→Y
:Text(48,1,Str2+" HITS")
:End
:If Z=93 and D=1
:Then
:randInt(1,15→E
:Y-E→Y
:Text(48,1,Str2+" HITS")
:End
:If Z=93 and D=2
:Text(48,1,"BLOCKED")
:If Z=93 and D=3
:Then
:randInt(1,15→E
:X-E→X
:Text(48,1,"TANK HITS")
:End
:If Z=94 and D=1
:Then
:randInt(1,10→E
:X-E→X
:Text(48,1,"TANK HITS")
:End
:If Z=94 and D=2
:Then
:randInt(1,10→E
:Y-E→Y
:Text(48,1,Str2+" HITS")
:End
:If Z=94 and D=3
:Text(48,1,"BLOCKED")
:End
:If X≤0 and Y≥0
:Then
:"TANK WINS          GAME OVER
:prgmA
:ClrDraw
:AxesOn:Goto A
:End
:If Y≤0 and X≥0
:Then
:"YOU WIN   CONGRATS!
:prgmA
:ClrDraw
:AxesOn
:End
adamac15 wrote:
Well now im having a problem with Y. It wants to stay at 0. ???
Y may change to 0 when you're using the graphscreen. Blame TI.
JosJuice wrote:
adamac15 wrote:
Well now im having a problem with Y. It wants to stay at 0. ???
Y may change to 0 when you're using the graphscreen. Blame TI.
Basically, every time you call ClrDraw, and at some other points, the value of Y gets reset to zero. The solution is to not use variable Y and the graphscreen together.,
More changes, but it didnt work. I used P instead of Y. You select the first person to battle, then it loads. After it loads, it goes to the next battle and loads. The second battle works fine.

Code:

Code:
:ClrHome
:AxesOff
:ZStandard
:ClrDraw
:Text(25,35,"LOADING")
:Shade({-}3,{-}1
:ClrHome
:ClrDraw
:1000→X:1000→P
:DelVar CDelVar DWhile X>0 and Y>0
:Text(1,1,Str2+":",X)
:Text(16,1,"BRIGGS:",p)
:Text(32,1,"HIT WHERE?")
:Text(40,1,"LOW=1 MID=2 HI=3")
:DelVar Z:Repeat Z=92 or Z=93 or Z=94
:randInt(1,3→D
:getKey→Z
:End
:ClrDraw
:If Z=92 and D=1
:Text(48,1,"BLOCKED")
:If Z=92 and D=2
:Then
:randInt(1,20→E
:X-E→X
:Text(48,1,"BRIGGS HITS")
:End
:If Z=92 and D=3
:Then
:randInt(1,20→E
:P-E→P
:Text(48,1,Str2+" HITS")
:End
:If Z=93 and D=1
:Then
:randInt(1,15→E
:P-E→P
:Text(48,1,Str2+" HITS")
:End
:If Z=93 and D=2
:Text(48,1,"BLOCKED")
:If Z=93 and D=3
:Then
:randInt(1,15→E
:X-E→X
:Text(48,1,"BRIGGS HITS")
:End
:If Z=94 and D=1
:Then
:randInt(1,10→E
:X-E→X
:Text(48,1,"BRIGGS HITS")
:End
:If Z=94 and D=2
:Then
:randInt(1,10→E
:P-E→P
:Text(48,1,Str2+" HITS")
:End
:If Z=94 and D=3
:Text(48,1,"BLOCKED")
:End
:ClrHome
:If X≤0 and P≥0
:Then
:"BRIGGS WINS        GAME OVER
:prgmA
:ClrDraw
:AxesOn:Goto A
:End
:If P≤0 and X≥0
:Then
:"YOU WIN   CONGRATS!
:prgmA
:ClrDraw
:AxesOn
:End
:Lbl G
:ClrHome
:AxesOff
:ZStandard
:Text(25,35,"LOADING")
:Shade({-}3,{-}1
:ClrHome
:ClrDraw
:X+491→X:1000→P
:DelVar CDelVar DWhile X>0 and P>0
:Text(1,1,Str2+":",X)
:Text(16,1,"TANK:",P)
:Text(32,1,"HIT WHERE?")
:Text(40,1,"LOW=1 MID=2 HI=3")
:DelVar Z:Repeat Z=92 or Z=93 or Z=94
:randInt(1,3→D
:getKey→Z
:End
:ClrDraw
:If Z=92 and D=1
:Text(48,1,"BLOCKED")
:If Z=92 and D=2
:Then
:randInt(1,20→E
:X-E→X
:Text(48,1,"TANK HITS")
:End
:If Z=92 and D=3
:Then
:randInt(1,20→E
:P-E→P
:Text(48,1,Str2+" HITS")
:End
:If Z=93 and D=1
:Then
:randInt(1,15→E
:P-E→P
:Text(48,1,Str2+" HITS")
:End
:If Z=93 and D=2
:Text(48,1,"BLOCKED")
:If Z=93 and D=3
:Then
:randInt(1,15→E
:X-E→X
:Text(48,1,"TANK HITS")
:End
:If Z=94 and D=1
:Then
:randInt(1,10→E
:X-E→X
:Text(48,1,"TANK HITS")
:End
:If Z=94 and D=2
:Then
:randInt(1,10→E
:P-E→P
:Text(48,1,Str2+" HITS")
:End
:If Z=94 and D=3
:Text(48,1,"BLOCKED")
:End
:If X≤0 and P≥0
:Then
:"TANK WINS          GAME OVER
:prgmA
:ClrDraw
:AxesOn:Goto A
:End
:If P≤0 and X≥0
:Then
:"YOU WIN   CONGRATS!
:prgmA
:ClrDraw
:AxesOn
:End
TESTING, TEST TEST, TESTING ONE TWO 3 TEST TEST TIESTING
Adam, would you mind being more precise about what doesn't work?
YAY!!!!! It's fixed. Now i can continue and finish Choice Endurance.

Now a question to you all. As you know, i have 20 people in it. Should i keep the 20, or should i halve that for a second Choice Endurance? Like 10/10?
I have a question about my TI-86... some of you told me earlier how to create them, but how would i make that work with the wordwrap program?
adamac15 wrote:
I have a question about my TI-86... some of you told me earlier how to create them, but how would i make that work with the wordwrap program?

I don't understand what you are saying... Sad
You know how i had the wordwrap program on the TI-84+? Well im trying to get that program onto my TI-86. Is there a way to do that?

EDIT: never mind i figured it out.


New problem: (remember, TI-86 oriented)


Code:
 :Menu("CHOICE ENDURANCE 2","START",B,"INSTRUCTIONS",C,"QUIT",D)


ERR: Data Type. ?????
I don't know much about TI-86 BASIC programming, so I can't help you here. Sad
I don't know much about TI-86 Basic programming either, but if I had to guess, you should try putting quotes around the labels, and then removing quotes from everything, and then try without the title.
Is there a way you can mark out an opponent after you've won against it? Like, beat the opponent, mark out, choose another?
That would have to be your code, sorry :/ The way I would do it is to keep a list with 1s or 0s saying whether you've fought them or not, and then in your code to display the names of the opponents, just don't display the ones with a 1 next to them.
(I don't know how this would work on an 86, but the TI-86 manual will help you to make the necessary transformations.)

Make a list: {0,0,0,...,0}→L1

Let each element correspond to a different foe.

After you beat the Xth foe, you could write 1 to the Xth element: 1→L1(X)

Later, to check if you've won against foe number X:

If L1(X)=1
Disp "ALREADY DEFEATED

The rest of the logic is yours to invent. Smile
Sadly, I have nothing to add to what _player and Weregoose have already offered you. A more optimized way would be to use bitmasks, but that's definitely going to be way too complex. I'd go with the method presented here.
  
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 2 of 2
» 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