Text Effects
Author |
Message |
mike200015
|
Posted: Sun Jan 30, 2005 12:26 am Post subject: Text Effects |
|
|
i want to use the text effect that sorta makes ur text appear like a typewriter, but i want to incorporate that into Font.Draw so the text can be in a different font
This is the effect i want..
code: |
var word :="Hello World"
for i : 1 .. length (word)
locate (1,i + 30)
put word (i) ..
delay (100)
end for
|
Does anyone know how to use that effect, but change the font?? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Mr. T
|
Posted: Sun Jan 30, 2005 12:31 am Post subject: (No subject) |
|
|
Hello, Mike! It's Alex.
The answer do you question is...
DO IT YOURSELF!
no autographs, please |
|
|
|
|
|
mike200015
|
Posted: Sun Jan 30, 2005 12:49 am Post subject: (No subject) |
|
|
Pwned wrote: Hello, Mike! It's Alex.
The answer do you question is...
DO IT YOURSELF!
no autographs, please
Stop Spamming the help section Alex |
|
|
|
|
|
Mr. T
|
Posted: Sun Jan 30, 2005 1:03 am Post subject: (No subject) |
|
|
mike200015 wrote: Pwned wrote: Hello, Mike! It's Alex.
The answer do you question is...
DO IT YOURSELF!
no autographs, please
Stop Spamming the help section Alex
stop asking turing hax00rz to do your homework, mike |
|
|
|
|
|
Neo
|
Posted: Sun Jan 30, 2005 1:34 am Post subject: (No subject) |
|
|
code: |
var font : int := Font.New ("ROCKWELL:12:BOLD")
var word := "Hello World"
for i : 1 .. length (word)
Font.Draw (word (i), 50 + (i*15), 50, font, green)
delay (100)
end for
|
|
|
|
|
|
|
AsianSensation
|
Posted: Sun Jan 30, 2005 8:41 am Post subject: (No subject) |
|
|
Pwned wrote: mike200015 wrote: Pwned wrote: Hello, Mike! It's Alex.
The answer do you question is...
DO IT YOURSELF!
no autographs, please
Stop Spamming the help section Alex
stop asking turing hax00rz to do your homework, mike
No seriously, stop spamming. -10 bits. |
|
|
|
|
|
mike200015
|
Posted: Sun Jan 30, 2005 11:54 am Post subject: (No subject) |
|
|
Neo wrote: code: |
var font : int := Font.New ("ROCKWELL:12:BOLD")
var word := "Hello World"
for i : 1 .. length (word)
Font.Draw (word (i), 50 + (i*15), 50, font, green)
delay (100)
end for
|
Thanks Neo the code worked. |
|
|
|
|
|
basketball4ever
|
Posted: Sun Jan 30, 2005 1:32 pm Post subject: (No subject) |
|
|
Another way to do it, not using Font.Draw
code: | var introline := "Hello World."
for a : 1 .. length (introline)
put introline (a) ..
delay (100)
end for
|
Basically an explanation:
first you declare a variable as a string, and put the message in it.
Then use a for loop, going from 1, to the number of characters in your variable string.
Next, put introline(a) is substituted to introline (1) displaying the 1st character
then introline (2) display the 2nd character, because the variable a goes from 1..length of the variable
a delay has to be put to make that effect
Hope this helps . |
|
|
|
|
|
Sponsor Sponsor
|
|
|
mike200015
|
Posted: Sun Jan 30, 2005 1:39 pm Post subject: (No subject) |
|
|
hey thanks basketball4ever for explainin what it all does in detail, made it clearer for me. I figured that part out, but i wanted to incorporate it into font.draw . I used that with font.draw and it worked, except the only thing is, is that the letters arent all evenly spaced between eachother, some have larger and some r smaller |
|
|
|
|
|
basketball4ever
|
Posted: Sun Jan 30, 2005 2:13 pm Post subject: (No subject) |
|
|
mike200015 wrote: hey thanks basketball4ever for explainin what it all does in detail, made it clearer for me. I figured that part out, but i wanted to incorporate it into font.draw . I used that with font.draw and it worked, except the only thing is, is that the letters arent all evenly spaced between eachother, some have larger and some r smaller
don't think you can actually do that... since each chracter for Font.Draw is measured in pixels... its hard to impossible. Unless you code each and everyone individually so that it appears after the delay... its hard m8. |
|
|
|
|
|
mike200015
|
Posted: Sun Jan 30, 2005 2:45 pm Post subject: (No subject) |
|
|
yea that would be really anoying. o well. thanx anyway |
|
|
|
|
|
Cervantes
|
Posted: Sun Jan 30, 2005 2:49 pm Post subject: (No subject) |
|
|
|
|
|
|
|
|
mike200015
|
Posted: Sun Jan 30, 2005 2:55 pm Post subject: (No subject) |
|
|
Cervantes wrote:
That worked! thanx! what does the code mean tho, can u explain like wat each thing is tho if you dont mind. |
|
|
|
|
|
Cervantes
|
Posted: Sun Jan 30, 2005 3:13 pm Post subject: (No subject) |
|
|
Okay, the first three lines are simply variable declarations. You've already seen the first two. The third (x) is a variable that will store the x location that we are drawing our text at.
The for loop, you've seen. The Font.Draw, you've seen. Notice, however, that I'm drawing the string at the variable x. So, in order to move where we draw the string, we need to change x. We do that in the next line. And all we do is increase x by the width of the character that we just drew. Thus, the next time we use x, we'll be drawing at the end of the previous character, or the first blank spot.
It shouldn't be that difficult to understand, if you know what Font.Width does. If you don't, read the turing help file (press F9).
-Cervantes |
|
|
|
|
|
|
|