Re: TIB: I NEED HELP


[Prev][Next][Index][Thread]

Re: TIB: I NEED HELP




You could do this:

:"The number of hits is h
:Repeat H=3
...
... (code)
:If (it is hit):1+h->h
:End

you have to change the (code) and (it is hit) to suit your needs...

>This is a a game that i am working on. I am just having trouble with one
>thing. The game is in a loop  until  you get hit 3 times, but the games
>just get slower and slower until i get an error 15 memory. Is there any
>way i can get this to stop happening using a for, while, or reapeat
>statement? Any help would be greatly appreaciated.
>
>Thanks,
>
>Nate Browning
>browningn@usa.net
>
>
>SCRN is a string that displays the screen. It isn't listed in here but it
>doesnt have anything to do with my problem. It is declared under my intro
>screen. Also i have a high score screen that isnt here either. It is just
>the bit of code that i am having trouble with
>
>6/->/F1A
>3/->/LIFE
>0/->/SCORE
>"<^>"/->/SHIP
>8/->/M1:13/->/M2
>9/->/E1A:3/->/E1
>0/->/F1:9/->/E2A
>ClLCD
>Outpt(1,1,SCRN
>Outpt(M1,M2,SHIP
>
>Lbl MOVE
>If LIFE<=0:Goto DEAD
>Outpt(M1,M2,SHIP
>Outpt(5,1,SCORE
>Outpt(8,3,LIFE
>getKy/->/N
>If N==24:Goto LEFT
>If N==26:Goto RIGHT
>If N==21:Goto FIRE
>If N==11:Goto PAUS
>If E1A>= 9 or E1==0
>Goto EMA
>If E1A-1==F1A+1 and E2A==F2A
>Goto EHIT
>GOTO FMOVE
>
>Lbl FMOVE
>If F1A<= 1 or F1==0
>Then
>0/->/F1
>Outpt(2,F2A," "
>Goto ENEMY
>Else
>If F1A>=a
>Outpt(F1A,F2A,"'"      <- There is an apostrophe between the quotes
>Outpt(F1A+1,F2A," "
>(F1A-1)/->/F1A
>Goto ENEMY
>Lbl ENEMY
>If E1A==9
>Then
>Goto MOVE
>Else
>If E1==1
>Then
>Outpt(E1A,E2A,"*"   <- The asterix is the enemy i use something different
>in the game itself
>Outpt(E1A-1,E2A," "
>(E1A+1)/->/E1A
>Goto MOVE
>
>Lbl LEFT
>If M2-1==7
>Then
>Outpt(M1,M2,SHIP
>Goto MOVE1
>Else
>M2-1/->/M2
>Outpt(M1,M2,SHIP
>Outpt(M1,M2+3," "
>Goto MOVE1
>Lbl MOVE1
>If E1A==9
>Then
>Goto MOVE
>Else Outpt(E1A,E2A,"*"
>Outpt(E1A-1,E2A," "
>(E1A+1)/->/E1A
>If F1A==0
>Then
>Goto MOVE
>Else
>If F1>=1
>Outpt(F1A,F2A,"'"  <-again there is an apostrope in here
>Outot(F1A+1,F2A," "
>(F1A-1)/->/F1A
>Goto MOVE
>Goto MOVE
>
>Lbl RIGHT
>If M2+3==21
>Then
>Outpt(M1,M2,SHIP
>Goto MOVE2
>Else
>M2+1/->/M2
>Outpt(M1,M2,SHIP
>Outpt(M1,M2-1," "
>Goto MOVE2
>Lbl MOVE2
>If E1A==9
>Then
>Goto MOVE
>Else
>Outpt(E1A,E2A,"*"
>Outpt(E1A-1,E2A," "
>(E1A+1)/->/E1A
>If F1A==0
>Then
>Goto MOVE
>Else If F1==1
>Outpt(F1A,F2A,"'"   <-apostophe here too
>Outpt(F1A+1,F2A," "
>(F1A-1)/->/F1A
>Goto MOVE
>Goto MOVE
>Lbl FIRE
>If F1==0
>THen Goto FMA
>Else
>Goto FMOVE
>Lbl FMA
>1/->/F1
>M1-1/->/F1A
>M2+1/->/F2A
>Outpt(F1A,F2A,"'"  <-apostrophe
>Goto FMOVE
>
>Lbl EMA
>If E2A==M2 or E2A==M2+1 or E2A==M2+2
>Then
>Outpt(M1,M2,"   "  <-three spaces
>(LIFE-1)/->/LIFE
>8/->/M1:13/->/M2
>9/->/E1A:3/->/E1
>0/->/F1:9/->/E2A
>Goto MOVE
>Else Outpt(8,E2A," "
>1/->/E1
>2/->/E1A
>int(rand x 14)+8/->/E2A
>Goto FMOVE
>
>Lbl PAUS
>Outpt(5,12, "paused"
>Pause
>Outpt(1,1,SCRN
>Goto MOVE
>
>Lbl EHIT
>Outpt(E1A,E2A," "
>9/->/E1A:3/->/E1
>0/->/F1:9/->/E2A
>(SCORE+10)/->/SCORE
>Goto MOVE
>
>Lbl DEAD
>End
>
>
>
>____________________________________________________________________
>Get free e-mail and a permanent address at http://www.netaddress.com