
-----------------------------------
ladum
Tue Jun 09, 2009 3:52 pm

DDR help please?
-----------------------------------
Hi, 'm looking for a way to make the arrows move up the screen one after the other, , i need more than one arrow on the screen at a time... without using forks... i've tried arrays but the arrows move up the screen very choppy, here is a sample of one of the forks... please help?

process pdown
    loop

        Sprite.Hide (boo)
        Sprite.Hide (perfect)
        Sprite.Hide (correctds)
        Sprite.Show (sdown)
        timerunning := Time.Elapsed
        exit when timerunning > 88000
        counter := counter + 1
        %Move the sprite up
        for i : arrow2 .. maxy + 50 by 5


            Input.KeyDown (chars)
            if chars (KEY_DOWN_ARROW) and i > 825 and i < 850 then
                response := 1
                Sprite.Hide (sdown)
                Sprite.Show (perfect)
                Sprite.Show (correctds)

            end if
            Sprite.SetPosition (sdown, 275, i, true)
            delay (1)
            View.Update

        end for
        if response = 1 then
            perfects := perfects + 1
            response := 0
        else
            boos := boos + 1
        end if

        delay (1)
    end loop
end pdown

-----------------------------------
Tony
Tue Jun 09, 2009 8:14 pm

Re: DDR help please?
-----------------------------------
the arrows move up the screen very choppy
[tdoc]View.Update[/tdoc]

-----------------------------------
ladum
Tue Jun 09, 2009 8:43 pm

Re: DDR help please?
-----------------------------------
even when i used that it still seemed choppy, for the array one... here's a sample

loop
    for i : 1 .. 4
        if height (i) = 1 then
            Sprite.SetPosition (spriteArrow (i), 400, d (i), true)
            Input.KeyDown (chars)
            
            if Math.Distance(400,d(i),400,885) 775 and d (i) < 875 then
                Sprite.Hide (sup)
                Sprite.Show (perfect)
                b(i):=1
            end if

        elsif height (i) = 2 then
            Sprite.SetPosition (spriteArrow (i), 150, d (i), true)
            Input.KeyDown (chars)
            %if d (i) > 855 and
            if Math.Distance(150,d(i),150,885) 775 and d (i) < 875 then
                Sprite.Hide (sleft)
                Sprite.Show (perfect)
                b(i):=1

            end if
        elsif height (i) = 3 then
            Sprite.SetPosition (spriteArrow (i), 275, d (i), true)
            Input.KeyDown (chars)
            
            if Math.Distance(275,d(i),275,885) 775 and d (i) < 875 then
                Sprite.Hide (sdown)
                Sprite.Show (perfect)
                b(i):=1

            end if
        elsif height (i) = 4 then
            Sprite.SetPosition (spriteArrow (i), 525, d (i), true)
            Input.KeyDown (chars)
           
            if Math.Distance(525,d(i),525,885) 775 and d (i) < 875 then
                Sprite.Hide (sright)
                Sprite.Show (perfect)
                b(i):=1

            end if
        end if

        d (i) := d (i) + 1
        delay (1)
        View.Update
        
    end for
    delay (100)
    Sprite.Hide (boo)
    Sprite.Hide (perfect)
%exit when counter

end loop

-----------------------------------
Tony
Tue Jun 09, 2009 8:47 pm

RE:DDR help please?
-----------------------------------
have you set the view type?

-----------------------------------
Insectoid
Wed Jun 10, 2009 5:01 pm

RE:DDR help please?
-----------------------------------
You need View.Set ("offscreenonly") before you draw anything, preferably the first line of the program (excluding comments)
