TIB: TI-86 BASIC question
[Prev][Next][Index][Thread]
TIB: TI-86 BASIC question
ok, ive had a bit of free time lately and am trying to toss together a BASIC
program for the TI-86. however, ive ran into a problem.
(by the way, this game im making isnt going to be anything other than
something for me to do in my free time. when its done it'll probably take up
the entire calcs memory and is entirely text-based. but anyways).
what im trying to do is a text-based game similar to Shadowgate for the NES.
you know, walking around, choosing paths, using a few items, etc. nothing too
complex.
anyways, what im having a problem with is, there are items around, and ive
figured (basically) how to get them to appear with various variables on a
list any time one types "EQUIP" at a ? prompt. however, im not sure of the
code to get it to return to where it left off after that. (that didnt make
alot of sense, did it? well, i'll just copy the beginning part of the program
below and hopefully someone can figure out what i mean)
:Lbl EQUIPS
:If B=2
:Pause "Crowbar"
:Lbl BEGINNING
:Pause "You are at the enterance to an abandoned castle"
:Pause "Do you wish to enter?"
:Lbl START
:Pause "1=Yes, 2=No"
:Prompt A
:If A==1
:Goto ONE
:If A==2
:Stop
:If A>2
:Goto START
:Lbl ONE
:DelVar(A)
:Pause "As you enter you see a large doorway to the north and a small closet
to the east. The exit to the castle is back to the south. Where do you wish
to go?"
:Pause "1=N, 2=E, 3=S"
:Prompt A
:If A==1
:Goto TWO
:If A==2
:Goto CLOSET
:If A==3
:Goto BEGINNING
:Lbl CLOSET
:Pause "You see a small crowbar on a shelf. Do you take it?
:Pause "1=Take Crowbar, 2=Leave Closet
:Prompt B
:If B==2
:Goto ONE
:If B==1
:Pause "You have taken the crowbar. Type EQUIP at any time to see what items
you have"
:Goto CLOSET2
:Lbl CLOSET2
:Pause "You are in an empty closet"
:Pause "1=exit"
:Prompt A
:If A==1
:Goto ONE2
:If A==EQUIP
:Goto EQUIPS
:Lbl ONE2
:Pause "As you enter you see a large doorway to the north and a small closet
to the east. The exit to the castle is back to the south. Where do you wish
to go?"
:Pause "1=N, 2=E, 3=S"
:Prompt A
:If A==1
:Goto TWO
:If A==2
:Goto CLOSET2
:If A==3
:Goto BEGINNING
there are a few other things in that that im aware im going to have to work
out (im going to have it so that when someone walks into the closet, for
example, the crowbar is automatically picked up and the B is automatically
stored as 1). just some stuff like that), but those i know. what im trying to
do is, as you can see, i stuck the EQUIPS lbl at the top of the program, what
im trying to do is, at any point in the game, one can type EQUIP, have it
display that list, and then go back to the line at which they typed EQUIP...
its probably not really that complex of a thing (geeze i wrote a long mail
just to explain it though), just i dont know what to enter to get it to do
that.
thanks
Follow-Ups: