Author |
Message |
|
Jedd 1980 Pong World Champion
Elite
Joined: 18 Nov 2003 Posts: 823
|
Posted: 23 Nov 2003 09:51:05 pm Post subject: |
|
|
It's really easy to clear only certain things. Let's say you wanted to output and then erase "HELLO" on the home screen:
Output(3,2,"HELLO"
Pause
Output(3,2," "
All you have to do is make an output in the same place with the same # of spaces as the word you are deleting. This is also how people can delete things like the tail of a snake or the edge of something moving in games. As for making something blink, you need to stall the calc for a little while, or it will blink too fast to notice. To do this, use a For loop:
While 1
Output(3,2,"HELLO"
For(A,1,30
End
Output(3,2," "
For(A,1,30
End
End
Adjust the numbers in the For loops to determine how much time you want the message "HELLO" or the blank to stay on the screen. You can also do this with Text( if you want to display a message on the graph screen, but remember a space in text is only a few pixels long, so you usually need more than the number of letters in the message.
As for paying to be a member here, no, you don't have to. |
|
Back to top |
|
|
Jedd 1980 Pong World Champion
Elite
Joined: 18 Nov 2003 Posts: 823
|
Posted: 23 Nov 2003 09:54:19 pm Post subject: |
|
|
Oh and just so you don't get confused, when i said Output(3,2," " i meant that you need it to output 5 spaces since the word "hello" is 5 spaces long. But spaces on computers are really small so it should look more like:
Output(3,2," " |
|
Back to top |
|
|
Jedd 1980 Pong World Champion
Elite
Joined: 18 Nov 2003 Posts: 823
|
Posted: 23 Nov 2003 09:54:56 pm Post subject: |
|
|
Aww nevermind, computer spaces suck. Hopefully you get the idea |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 24 Nov 2003 07:03:53 am Post subject: |
|
|
Computer spaces don't suck, the forum parser (which does) simply changes multiple spaces to just one.
Last edited by Guest on 24 Nov 2003 07:05:35 am; edited 1 time in total |
|
Back to top |
|
|
Jedd 1980 Pong World Champion
Elite
Joined: 18 Nov 2003 Posts: 823
|
Posted: 24 Nov 2003 12:13:31 pm Post subject: |
|
|
Gotcha. Now im noticing while people write things like Output("(5 Spaces)" |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 24 Nov 2003 04:03:18 pm Post subject: |
|
|
would this work?
Code: Output(" ")
EDIT: It worked... hehehehe...
Last edited by Guest on 24 Nov 2003 04:03:58 pm; edited 1 time in total |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 24 Nov 2003 07:11:03 pm Post subject: |
|
|
Yes:
Code: :Repeat Ans=105
:Output(3,2,"Hello"
:For(X,1,30
:End
:Output(3,2," "
:For(X,1,30
:End
:getKey
:End
|
|
Back to top |
|
|
Jedd 1980 Pong World Champion
Elite
Joined: 18 Nov 2003 Posts: 823
|
Posted: 24 Nov 2003 07:42:54 pm Post subject: |
|
|
The only dissadvantage to that coding is that you have to wait until HELLO has blinked on and off, but usually that doesnt matter to much.
Also, instead of Repeat Ans=105 you could put
Repeat getkey=105
But if you REALLY want to optomise the code you should put:
getkey
Repeat getkey=105
This prevents ending the loop before it starts because of a leftover key press from something earlier in the program. |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 25 Nov 2003 08:47:58 am Post subject: |
|
|
Quote: Also, instead of Repeat Ans=105 you could put
Repeat getkey=105 No, well... you can code it like that.. but it doesn't work (error).
Quote: But if you REALLY want to optomise the code you should put:
getkey
Repeat getkey=105
This prevents ending the loop before it starts because of a leftover key press from something earlier in the program. This is absolutely innescesary, because repeat always executes at least once and thus any getkey statement inside the loop will be executed, meaning any previous keypresses will be flushed. Also keep in mind that key 105 doesn't repeat like the arrow keys (you can't keep it pressed down and have the calc see it as still pressed down, it'll just see the initial pressing down of the key as one key press).
EDIT:
Nice blinkity until input:
Code: Repeat Ans
Output(1,1,sub("BLINKITY ",1+8(A>0),8
A+1-2A(A>5->A //increase 5 for slower blinking, decrease it for faster blinking
getKey=105
End
Last edited by Guest on 25 Nov 2003 08:52:23 am; edited 1 time in total |
|
Back to top |
|
|
Jedd 1980 Pong World Champion
Elite
Joined: 18 Nov 2003 Posts: 823
|
Posted: 25 Nov 2003 10:49:44 am Post subject: |
|
|
that makes sense now. i programmed a game on my friend's calc that counted how many times you could hit enter before time ran out (a for loop of 400) and i wondered why you couldn't just hold it down. then when i switched it to the arrow key you could. are there any others besides the arrow keys like that? |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 25 Nov 2003 11:30:01 am Post subject: |
|
|
I just tested all the keys and it turns out only the arrow keys and [DEL] can be held down effectively.
Code: Repeat 0
If getKey:Then
X+1->X
If Ans>8:Then
ClrHome
1->X
End
Output(Ans,1,Ans
End
End
Last edited by Guest on 25 Nov 2003 11:30:10 am; edited 1 time in total |
|
Back to top |
|
|
Babyboy
Advanced Member
Joined: 11 Jun 2003 Posts: 499
|
Posted: 25 Nov 2003 08:42:12 pm Post subject: |
|
|
that is really interesting! i never thought of the holding buttons for repeat... that could be usefull in final fantasy... |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 26 Nov 2003 10:56:43 am Post subject: |
|
|
It's also quite usefull in shooting games (rapid fire). |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 26 Nov 2003 02:34:57 pm Post subject: |
|
|
I have yet to see a game where the [del] key or arrows were used to shoot. |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 26 Nov 2003 02:39:04 pm Post subject: |
|
|
Yeah, for some reason everybody uses [2ND] |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 26 Nov 2003 02:49:29 pm Post subject: |
|
|
Because it's bright yellow (and glittery on SE's )?
Edit: I had a game once where you pressed [x^-1] [sin] [cos] [tan] for rapid fire. Maybe that was an error.
Last edited by Guest on 26 Nov 2003 02:50:40 pm; edited 1 time in total |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 26 Nov 2003 03:12:42 pm Post subject: |
|
|
Like pressed [X^-1], then quickly pressed [SIN], then [COS], and then [TAN] or all together at ~ the same time. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 26 Nov 2003 03:20:47 pm Post subject: |
|
|
At the same time. With one hand. I needed the other for the arrow keys.
Oooh! I remember! It was Phantom Star! |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 26 Nov 2003 03:23:37 pm Post subject: |
|
|
Odd, maybe it remembered (buffer) them as 4 sequential key presses? getKey has a habit of doing that to up to 1 keypress. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 26 Nov 2003 03:27:58 pm Post subject: |
|
|
I've noticed that in mario, also, you can press some combinations of buttons in one row and they have the effect of pressing a completely different button. |
|
Back to top |
|
|
|