How can I align the Starting Point?
Author |
Message |
ProgrammedAlec
|
Posted: Tue Nov 11, 2008 7:13 pm Post subject: How can I align the Starting Point? |
|
|
Hi, I want to Align the starting point for the Matrix text-fall.
here's what i've got so far:
var one: int
loop
randint (one, 1, 10)
put one
end loop
but the problem is that it only starts at 1,1 and it continuesly goes down.
how can I start it at 2,1 and 3,1 and 4,1 etc, etc so I can get the actual matrix text-fall effect?
Any help appriciated, thank you! |
|
|
|
|
|
Sponsor Sponsor
|
|
|
TheGuardian001
|
Posted: Tue Nov 11, 2008 7:25 pm Post subject: Re: How can I align the Starting Point? |
|
|
locate(row,column) is what you would want for this. it sets the input cursor to the specified row and column |
|
|
|
|
|
ProgrammedAlec
|
Posted: Tue Nov 11, 2008 7:50 pm Post subject: RE:How can I align the Starting Point? |
|
|
Well here's what I got..
var one: int
loop
randint (one, 1, 10)
locate (1,2)
put one
end loop
But the problem is that it starts at (1,2) but it stays there instead of rolling down the screen with random numbers between (1,10). What can I do to still have it start at (example: (1,2) ) but scroll down? |
|
|
|
|
|
Insectoid
|
Posted: Tue Nov 11, 2008 8:44 pm Post subject: RE:How can I align the Starting Point? |
|
|
Look at this piece of code. What do you notice? |
|
|
|
|
|
ProgrammedAlec
|
Posted: Tue Nov 11, 2008 8:54 pm Post subject: RE:How can I align the Starting Point? |
|
|
I know, it specifies the location it IS and not the location it starts.
it's (row,colum) so first row and second colum makes sense, if that's what you're referring to. |
|
|
|
|
|
Insectoid
|
Posted: Tue Nov 11, 2008 9:04 pm Post subject: RE:How can I align the Starting Point? |
|
|
Well, the reason it isn't working is because it is always printing to the location (1,2). It never moves. I would suggest holding the Y in a variable, and increasing it every time the loop executes. |
|
|
|
|
|
ProgrammedAlec
|
Posted: Tue Nov 11, 2008 9:09 pm Post subject: RE:How can I align the Starting Point? |
|
|
I have to say, I am a huge begginer.
One day learning actually. I've been using the Help References in the Turing program but I can't properly put the code together.
Do you know how to do what you just said?
Can you fit it in for me?
PS. Insectoid, I tried one of your tutorials on 2D Game making It was a bit helpful but all I could do was memorize the script, not write it by heart. Still getting there. |
|
|
|
|
|
Insectoid
|
Posted: Tue Nov 11, 2008 9:15 pm Post subject: RE:How can I align the Starting Point? |
|
|
Turing: |
var y : int := 2
loop
y + = 1 %This will increase a number by 1. Same as 'y := y + 1', but shorter
locate (1, y )%see how the variable was put here, instead of a number?
end loop
|
My tutorial is for people who already have a good understanding of basic concepts and syntax. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|
|