TIB: Re: question


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

TIB: Re: question




-----Original Message-----
From: kimo <kimo@ultra.internetland.net>
To: ti-basic@lists.ticalc.org <ti-basic@lists.ticalc.org>
Date: Sunday, February 15, 1998 9:29 PM
Subject: TIB: question


>Is there any way to have a command that executes a certain part of another
>program?  Not the whole program, but just a certain section.


Yes, as a matter of fact, there is... goto
http://stuntworks.home.ml.org/ti8xprograms.html and download the AD&D
Character Utilities (or get it off of ticalc.org if that doesn't work).  The
ALTDROLL.85P is called by AD&DCHAR.85P.

What is done, is a variable is made to be a "counter."

:If REROLL==1
:Then
:0/->/REROLL
:If Method==2
:Goto IIR
:If Method==3
:Goto IIIR
:If Method==4
:Goto IVR
:If Method==5
:Goto VR
:If Method==6
:Goto VIR
:End

Method is set to 0 when a user rolls the dice.  If a user used an alternate
dice rolling method, then pressed [(-)] (to reroll), the program would be
called and would automatically reroll the dice (because REROLL would be set,
and the GOTO takes care of the rest).

It provides terrific integration, you can try out the program to get the
effect (even if you've never played AD&D, I hadn't played it more than once
when I wrote this and I still don't play).  The code is my favorite: large
but optimized and I'm very proud of it.

Feel free to use the ideas like integration and such, just don't
copy-pasteu, please.  ;)
-----
Stuntman (Nathan Haines) - ICQ UIN#: 2157863
http://www.cyberverse.com/~stuntman/nathan.html
President of Stuntworks, QuickBASIC/Visual BASIC programmer,
Stuntworks - http://stuntworks.home.ml.org