
-----------------------------------
Big_Tom
Tue Jun 03, 2003 12:22 pm

help with For statements
-----------------------------------
Is it possible to make a for statment scroll the text across the screen. I know i can do it the only cath is i want it to be font.draw, rather then just normal text...ne help would be great.

-----------------------------------
Blade
Tue Jun 03, 2003 12:28 pm


-----------------------------------
ok. well pretty much just run a for loop from 0 to the end of the screen, being maxx..
View.Set ("offscreenonly")
var font : int := Font.New ("Arial:30")
for i : 0 .. maxx
    Font.Draw ("Hello", i, maxx div 2, font, black)
    View.Update
    cls
end for

-----------------------------------
Tony
Tue Jun 03, 2003 12:36 pm


-----------------------------------
to scroll the text, you can take a picture of the screen (0,0,maxx,maxy) and move it up one line. Problem is, it will scroll only 1 way.

-----------------------------------
Big_Tom
Wed Jun 04, 2003 8:17 am


-----------------------------------
I want to make the text scroll across the screen letter by letter, for example when your declare the line as a constant and then sub it in latter in the program. What i need to be able to do is make it with fon.draw so i can make the cool matrix text.

-----------------------------------
Tony
Wed Jun 04, 2003 9:26 am


-----------------------------------
we have a bunch of different source codes for matrix effect...

-----------------------------------
Mephi
Wed Jun 04, 2003 11:15 am


-----------------------------------
as in text delay?


procedure textDelay (word : string)
for i : 1 .. length(word)
Font.Draw (word (i), ....)
delay (30)
end for
end textDelay


i think this works....i dunno if this is wut u want tho..

-----------------------------------
Big_Tom
Wed Jun 04, 2003 11:21 am


-----------------------------------
No that doesn't work and, it might be what i need but i dont know yet...so if it's possible can you please help me make the text scroll across the screen letter by letter IN font.draw

-----------------------------------
Tony
Wed Jun 04, 2003 11:59 am


-----------------------------------
just what Mephi posted... using Font.Draw to scroll letter by letter... You can ether do it horizontaly, or vertically... just depends which value you substitute with a loop counter.

-----------------------------------
Big_Tom
Wed Jun 04, 2003 12:15 pm


-----------------------------------
I Still can't get it to work it's really pissing me off to no end.

-----------------------------------
Mephi
Wed Jun 04, 2003 8:22 pm


-----------------------------------
i hope you didnt just copy+paste the code, cuz i wuz lazy and didnt put in a lot of stuff....newayz, heres for u lazy people:
var font : int := Font.New ("Arial:12:bold")
procedure textDelay (word : string) 
for i : 1 .. length(word) 
Font.Draw (word (i), 1 + (15*i), 300, font, black) 
delay (30) 
end for 
end textDelay 

textDelay ("HELLO")


-----------------------------------
Blade
Wed Jun 04, 2003 10:18 pm


-----------------------------------
i dunno what you really want. but this may help you... you're gonna have to modify it a bit for what you want but its just scrolls one letter a time from top to bottom... i'm not doing the whole damn project for you because as most of you will agree... thats really stupid of you to ask lol

View.Set ("offscreenonly")
var font : int := Font.New ("Arial:20")
var x : int

procedure scroll (word : string (30),del:int)
    for i : 1 .. length (word)
        x := Rand.Int (0, maxx)
        for decreasing k : maxy .. 0
            Font.Draw (word (i), x, k, font, black)
            View.Update
            delay (del)
            cls
        end for
    end for
end scroll

scroll ("hello",3)
