
-----------------------------------
marshymell0
Sun May 01, 2005 1:43 pm

stars
-----------------------------------
I was wondering, is there a way to make a million of these stars like pop up and fade away?
var x : int := 1
var y : int := 1
colourback (black)
process star
loop
    randint (x, 1, maxy)
    randint (y, 1, maxy)
    for decreasing kolour : 103 .. 16
        cls
        drawfillstar (x, y, x + 50, y + 50, kolour)
        View.Update
    end for
end loop
end star
fork star
 cause when I fork star many times like fork star fork star fork star it makes no difference! thx

-----------------------------------
Cervantes
Sun May 01, 2005 3:40 pm


-----------------------------------
You shouldn't be using processes.  Read the tutorial to find out why :wink:

Here's your code, process-free!


View.Set ("offscreenonly")
colourback (black)

var star : array 1 .. 10 of
    record
        x, y : int
        clr : int
        size : int
    end record

for i : 1 .. upper (star)
    star (i).x := Rand.Int (0, maxx)
    star (i).y := Rand.Int (0, maxy)
    star (i).clr := 103
    star (i).size := 25
end for


loop
    cls
    for i : 1 .. upper (star)
        star (i).clr -= 1
        if star (i).clr 