You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

## Is This Possible?

0 Members and 1 Guest are viewing this topic.

b/General Help publicado por u/xMarminq_ November 08, 2016, 04:56:54 PM

## Is This Possible?

I been busy with making this game, with some dialogue. Every line I make I put a Wait command, and can make it REALLY long. What I am trying to do is make a setting that sets a variable to the wait time to increase or decrease delay on some parts. Heres the thing I basically want to implement, but the calc isnt reading the Y= , and making the Y 0 so it has no delay

Last Edit: November 08, 2016, 05:02:17 PM by xMarminq_
Inicia sesión o crea una cuenta para dejar un comentario
u/p2 November 08, 2016, 05:26:30 PM
could you add the source as a text for all those that dont have a calc around right now? ^^
u/Dream of Omnimaga November 08, 2016, 05:32:45 PM
Here is the source for those without a calc or TI-Connect. Thanks for providing a download link as well for those who do, though:

`ClrHomeOutput(6,1,"NOTICE:THIS WILL DETERMINE YOUR SPEED. DO 1. THIS IS FOR ME TO MAKE DIALOUGE FASTER"Prompt ZIf Z=11=YIf Z=20.1=YIf Z>2ReturnIf Y=0.1If Y=1ClrHomeWait 3Output(1,1,"1"Wait 1YOutput(1,2,"2"Wait 1YOutput(1,3,"3"Wait 1YOutput(1,4,"4"Wait 1YOutput(1,5,"5"Wait 1YOutput(1,6,"6"Wait 1YOutput(1,7,"7"Wait 9`

Anyway, the issue is you need to use the STO character to store stuff into variablees. The standard PC-like language syntax will not work on TI calculators. Basically, do 1->Y instead of 1=Y

Also unrelated, but if you have an extra variable to spare, the the last part of the code should be changed to this:

`For(A,1,7Wait 1YOutput(1,A,AEndWait 9`Which is slightly slower (since you use Wait the speed drop is negligible compared to without Wait) but takes much less space.
Last Edit: November 08, 2016, 05:36:18 PM by DJ Omnimaga
u/p2 November 08, 2016, 05:53:47 PM
Also you need to memorize this:
`If X=1  1->A2->B3->C`
ONLY line 2 is executed depending on the condition (an IF without a THEN only affects the first command coming afterwards.
So it's handled as if it would be like this:
`If X=1 Then  1->AEnd2->B3->C`
which means line 3 and 4 are ALWAYS executed as the IF doesn't touch them.
To execute all of them only if  the condition is met, do this:
`If X=1 Then  1->A  2->B  3->CEnd`
But if you really only want the first command (in this case 1->A) to be affected by the condition, use the first code instead of the second
u/xMarminq_ November 08, 2016, 06:01:17 PM
Thanks! It works!
You will see what I am making soon...
On my basic progress topic
Last Edit: November 08, 2016, 06:02:50 PM by xMarminq_
u/Dream of Omnimaga November 08, 2016, 06:06:28 PM
I can't wait.

On a side note, the Wait command is very new. It was only added a few months ago on the TI-84 Plus CE. Beforehand we had to use For(Z,0,999:End or stuff like RandRandRandRandRandRand for delays
u/xMarminq_ November 08, 2016, 11:14:21 PM
Glad I came after the update
u/Dream of Omnimaga November 08, 2016, 11:31:44 PM
Well, to be fair, programs that don't use Wait can at least run on more OSes due to better compatibility and can even be ported to older calcs more easily, but they're larger.
u/p2 November 09, 2016, 12:54:36 AM
True but as its only that single command, with one single input parameter...
I bet someone could create a tool to replace the wait command in any .8xp source file with our old  FOR method ^^
u/xMarminq_ November 09, 2016, 03:05:05 AM
If there is a menu with a lbl A and a variable A, do they cause interference?
Last Edit: November 09, 2016, 03:46:54 AM by xMarminq_
u/Dream of Omnimaga November 09, 2016, 05:09:59 AM
Lbl names are totally independent from variable names. Also lbl names can be up to 2 characters. You can use A variable without any issue.
u/xMarminq_ November 11, 2016, 01:35:35 AM
Cool. 3k now...

## b/General Help

Need programming or hardware help? Need software installing or running support, or just help with technology in general? Then this is the place to ask in.

77
Topics
Website statistics

MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators