Jumping to Pattern

General
robert83a1
2011-07-28
2013-05-14
  • robert83a1

    robert83a1 - 2011-07-28

    Hello,
    I'm currently playing with the SpriteEngine, managed to animate a few stuff… but I have a problem , which I think should be solvable only I don't know how.
     
        ADraw.Initialize

        FloatingBed := TImageSprite.Create(AdSpriteEngine);
        FloatingBed.Image:=AdImageList.Find('Bed');
        FloatingBed.X:=400;
        FloatingBed.Y:=300;
        FloatingBed.Z:=3;

       Idle;

        if Lefel3 = 0 then
          begin
            Varakozo2:=Varakozo2+1;
            if Varakozo2 = 10 then
              begin
                Varakozo2:=0;
                Szamlalo2:=Szamlalo2+1;
                if Szamlalo2 >= 4 then Lefel3:=1;
              end;
          end;
        if Lefel3 = 1 then
          begin
            Varakozo2:=Varakozo2+1;
            if Varakozo2 = 10 then
              begin
                Varakozo2:=0;
                Szamlalo2:=Szamlalo2-1;
                if Szamlalo2 <= 0 then Lefel3:=0;
              end;
          end;

    This count up till 4 then down to 0 then up again and so on, what I want to do is set the above sprite to use the pattern that is Szamlalo2 , but I don't know how to do it.

    Rob

     

     
  • robert83a1

    robert83a1 - 2011-07-29

    Ermmm…. meanwhile I've realized since I'm the one actualy putting togeather these "film strips" , I can create a larger one that goes from image number 1 to 80 , then from 80 to 1… makes the file a bit larger…

    Anyway if the above  is possible and is not a rather stupid thing ( sorry, I'm just starting out with this… bound to end up asking dumb questions)… I'm interested about the solution

    Robi

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks