[TIB] Re: TI-83 Basic stumper


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

[TIB] Re: TI-83 Basic stumper





Ben,

That's very clever; I hadn't considered that route.
However, it doesn't work in this situation for two
reasons.

  First and most important: my game uses the TI-83's
Horiz split mode to display the dungeon map and
the status messages simultaneously.  The map is
shown in the upper half of the window, and the status
messages ("YOU HIT THE ORC!  THE ORC MISSES.  YOU
HAVE SLAIN THE ORC...") scroll up in the bottom half
of the screen.
  Therefore, I can't use Output(, because I don't know
where on the display my messages will be appearing.

Picture time!

What I want:            What I can get:       What you get:

----------------        ----------------      ----------------
YOU HIT THE ORC.        YOU HIT THE ORC.      YOU HIT THE ORC.
THE ORC HITS!           THE ORC HITS!         THE ORC HITS!

becomes

----------------        ----------------      ----------------
THE ORC HITS!                         85      YOU HIT THE ORC.
YOU HAVE 85 GP.         GP.                   YOU HAVE  85 GP.


You see the problem?  The Output(s overwrite previous messages!
(I've modified the "YOU PICK UP THE 85 GOLD PIECES." message to
show the problem more clearly.  I hope you don't mind that I'm
changing the problem just when you had a solution...)

  The less serious problem: that extra space in the output,
before the "85".  That can actually be fixed with some clever
coding, but I don't think the first problem can.

  Verdict: this problem is still open.

Thanks,

-Arthur


On Monday, 19 Aug 2002, you wrote:
> From: "Ben Gladding" <benkenobi87@hotmail.com>
> Subject: [TIB] Re: TI-83 Basic stumper
> Date: Sun, 18 Aug 2002 16:10:18 -0400
>
>
> Arthur,
> Not sure if this is the "quick and speedy" method you are looking for, but I
> would just use Output( to shift the numbers/letters over.  ex:
>    If (player wants to pick up gold)
>    Then
>    randInt(10,100->G                {number of gold pieces}
>    Output(1,1,"You pick up the
>    Output(2,1,G
>    Output(2,5,"gold pieces
>
> I know this is a bit more cumbersome and larger than the orginial, but it
> was the easiest way I could think of to basically shift things over.  As for
> converting interger numbers to a string, I think it can be done (remember
> reading about it somwhere), but, alas seem to have misplaced website URL.
> Hope this helps...
> -Ben
>
> >From: "Arthur J. O'Dwyer" <ajo@andrew.cmu.edu>
> >Reply-To: ti-basic@lists.ticalc.org
> >To: ti-basic@lists.ticalc.org
> >Subject: [TIB] TI-83 Basic stumper
> >Date: Sun, 18 Aug 2002 13:50:54 -0400 (EDT)
> >
-snip-
> >   Is there a way in Basic to convert an
> >integer number to its string representation
> >in a string variable?  For example, in
> >my current project, "Rogue", I have piles
> >of gold pieces which the player can pick
> >up as in the following snippet:
> >
> >   If (player wants to pick up gold)
> >   randInt(10,100->G                {number of gold pieces}
> >   Disp "YOU PICK UP THE",G,"GOLD PIECES."
> >
> >But that displays as
> >
> >   YOU PICK UP THE
> >                 85
> >   GOLD PIECES.
> >
> >and what I want is more like
> >
> >   YOU PICK UP THE
> >   85 GOLD PIECES.
> >
> >which could be accomplished easily
> >if I could get the value of G into
> >Str1,...
> >
-snip-
> >-Arthur
> >ajo at andrew dot cmu dot edu