Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 movie scrept effect with data file
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
TrAnCeIn4LiFe




PostPosted: Tue Jun 01, 2004 12:53 pm   Post subject: movie scrept effect with data file

ok i found that movie script effect on the turing source and its really ncie i like it a lot i got the thing to work and read the information from the data file, but i ran intoa little problem it keeps going over the new location line all the time.... so anybody know how i coudl make it switch to another line when its done reading the first line in data file btw this is what i got

code:
procedure info

    setscreen ("noecho,nocursor")
    colorback (black)
    cls

    open : i, "info.t", get
    assert i > 0

    loop

        get : i, skip
        exit when eof (i)
        get : i, sentence : *
        color (white)
        locate (1, (maxcol - length (sentence)) div 2)
        for a : 1 .. length (sentence)
            put sentence (a) ..
            delay (100)
        end for

    end loop

    Input.Pause

    cls

end info
Sponsor
Sponsor
Sponsor
sponsor
SuperGenius




PostPosted: Tue Jun 01, 2004 2:41 pm   Post subject: (No subject)

Your question is a little confusing, but check your locate statement, cause if there is no variables in it that change you will be writing over the same spot.
TrAnCeIn4LiFe




PostPosted: Tue Jun 01, 2004 3:26 pm   Post subject: (No subject)

yah i mean how can i get second line of text appear under the title for example lets say i have title and info

INTERLOOPER
bladaskldjasd asdnasgbdasjdga

soemthing liek that but it wont appear under the title it just goes over the first line rewrite it so how can i change that to write the actually infomation under the title or skip a line... hopefully that explainsa bit
SuperGenius




PostPosted: Tue Jun 01, 2004 6:58 pm   Post subject: (No subject)

if you say

code:

locate (10,1)
put title
put othershit


title will go on line 10 and othershit will go on line 11. If you keep calling locate everything will go on the line specified. If you want a little extra space throw a put "" in there.
McKenzie




PostPosted: Wed Jun 02, 2004 11:46 am   Post subject: (No subject)

You will need a counter to keep track of which line you want to output to.
You have:
code:
        locate (1, (maxcol - length (sentence)) div 2)

you need:
code:
        locate (row, (maxcol - length (sentence)) div 2)
row+=1
TrAnCeIn4LiFe




PostPosted: Wed Jun 02, 2004 3:53 pm   Post subject: (No subject)

yup got it ehe Smile
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: