• Kamozo

    That's useful, but what if I wanted to animate a gif using the scene module only, with my own images? Would that be possible?

    posted in Pythonista read more
  • Kamozo

    Oh, okay. It'd be cool if they were. Perhaps maybe in a future version.
    I've tried splitting them, but I don't know how to make it continuously repeat.

    posted in Pythonista read more
  • Kamozo

    Hi, I was wondering if the scene module supported gifs. I've tried using them in my own project but they are just a still image.
    Here's some example code so you can see what I'm trying to do:

    from scene import *
    class MyScene (Scene):
        def setup(self):
            self.background_color = 'midnightblue'
            self.ship = SpriteNode('ship.GIF') #Why won't it play?
            self.ship.position = self.size / 2
            self.add_child(self.ship)
    run(MyScene())
    

    Help would be appreciated, thanks.

    posted in Pythonista read more
  • Kamozo

    Nevermind, I've figured it.
    Thanks for all your help.

    posted in Pythonista read more
  • Kamozo

    Oh yeah, I'm not sure how I didn't notice that.
    Where does the code you've provided fit into mine?

    posted in Pythonista read more
  • Kamozo

    Wow, thank you, that helps me a lot.

    posted in Pythonista read more
  • Kamozo

    Ahh, I understand that, thanks.
    I'll have to do some more reading now, because the call function confuses me, it doesn't take much code does it? Could you give an example of how I would do it, if that isn't too much to ask?
    But anyway, thanks, I'll look into it.

    posted in Pythonista read more
  • Kamozo

    Hello, why won't "repmo" repeat itself?
    I would like the action to continuously run after "phase_1", yet it only runs once. How do I fix this? Thank you.

            up = A.move_to(self.size.w/2, 350, 9,TIMING_EASE_BACK_OUT)  
            mo = A.move_to(random.randrange(100,924),random.randrange(300,700), 2, TIMING_EASE_BACK_IN_OUT)
            repmo = A.repeat(mo, -1)
            phase_1 = A.sequence(stationary, up) #stationary appears earlier
            self.boss.run_action(A.sequence(phase_1, repmo)) 
    

    This is only a snippet of code, I'm just highlighting the bits that need looking at. For example, although the code doesn't specify, A = Action.

    posted in Pythonista read more
  • Kamozo

    Thank you so much guys, I've figured it, it really means a lot that you guys took the time to help me.
    I didn't have it in the same folder as my script, ameteur mistake.
    But then again I am an ameteur, so it's to be expected.
    Thanks again, this was A LOT easier to understand, it's great to finally get this sorted.

    posted in Pythonista read more
  • Kamozo

    I've already tried it, it's empty.

    posted in Pythonista read more
  • Kamozo

    By hand. How do I insert the name directly?

    posted in Pythonista read more
  • Kamozo

    Thank you for the reply.
    How do I get the name of the image?
    In the "images" section of Pythonista, I have the sprite I wish to use, and it has a name something like "IMG.3836.PNG" or something very similar, but it doesn't seem to work.

    posted in Pythonista read more
  • Kamozo

    Thank you, I'll keep that in mind for future reference.
    And thank you again for your reply.
    Yes, I've read them a few times but I didn't quite seem to understand, I'm used to the old way of doing it, I'm very new to the changes to the scene module.
    If it isn't too much to ask, could you give me an example of the changes required for me to achieve this, so I just have to insert the image? Thank you, I may be a novice but I already like this community a lot.

    posted in Pythonista read more
  • Kamozo

    '#I am new to Pythonista, and the forums, so I apologise if I'm doing anything wrong. The updates to the scene module are confusing me. I really need to be able to add my own image from my photos into the space I mention below, I can't seem to figure it out. I can use the built in sprites just fine, but I want to be able to use my own now.
    Help is appreciated, thankyou.

    # coding: utf-8
    
    from scene import *
    
    
    class Game (Scene):
        def setup(self):
            self.background_color = '#000000'
            ground = Node(parent=self)
            x = 0
            while x <= self.size.w + 64:
                tile = SpriteNode('plf:Ground_SnowMid', position=(x, 0))
                ground.add_child(tile)
                x += 64
            self.player = SpriteNode('') #This is where I want to add an image of my own.
            self.player.anchor_point = (0.5, 0)
            self.player.position = (self.size.w/2, 32)
            self.add_child(self.player)
            
            
            
    
    if __name__ == '__main__':
        run(Game(), LANDSCAPE, show_fps=True)
    

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!