Computer Science Canada

Several Sprite Walking

Author:  gunsnr1992 [ Thu May 21, 2009 9:14 am ]
Post subject:  Several Sprite Walking

i need some help getting several (5) troopers apperaring on the screen at the same time going across the screen and stopping at different spots. if anyone can help it would be much appreciated.

Author:  Tallguy [ Sat May 23, 2009 7:47 am ]
Post subject:  RE:Several Sprite Walking

no one knows how??

lol i need help with this to...

Author:  tjmoore1993 [ Sun May 24, 2009 2:55 pm ]
Post subject:  RE:Several Sprite Walking

I know for a fact you can run them in a seperate processes... But if it is moving a character then you can simply use a code like this.

Turing:
procedure Movement
    loop
        View.Update
        Input.KeyDown (Pushed)
        if Pushed (KEY_RIGHT_ARROW) then
            loop
                Input.KeyDown (Pushed)
                exit when Pushed (KEY_RIGHT_ARROW) not= true
                %Background Update
                %FRAME 1
                View.Update
                Input.KeyDown (Pushed)
                exit when Pushed (KEY_RIGHT_ARROW) not= true
                %Background Update
                %FRAME 2
                View.Update
                exit
            end loop
        end if
        if Pushed (KEY_LEFT_ARROW) then
            loop
                Input.KeyDown (Pushed)
                exit when Pushed (KEY_LEFT_ARROW) not= true
                %Background Update
                %FRAME 1
                View.Update
                Input.KeyDown (Pushed)
                exit when Pushed (KEY_LEFT_ARROW) not= true
                %Background Update
                %FRAME 2
                View.Update
                exit
            end loop
        end if
    end loop
end Movement


The code has been modified so you may need to work around with it.


: