• PyNewb94

    @cvp Okay got it to rotate left and to rotate right , how can I go about applying force now like a thrust , I tried action_by But spaceship jumps across the screen ,

    posted in Pythonista read more
  • PyNewb94

    @cvp how would I set the code up to make the player rotate when I press the button ?

    posted in Pythonista read more
  • PyNewb94

    So in my code I have a script which shows a button on screen , when I press the button it’s suppose to make a sound but it doesn’t , eventually I want the button to control the character here’s the code

    from scene import *
    import ui
    import sound 
    import os 
    x, y = get_screen_size()
    button_font = ('Avenir Next' , 20)
    class ButtonNode (SpriteNode):
        def __init__(self, title, *args, **kwargs):
            SpriteNode.__init__(self, 'pzl:Button1', *args, **kwargs)
            button_font = ('Avenir Next', 20)
            self.title_label = LabelNode(title, font=button_font, color='black', position=(0,1), parent=self)
            self.title = title
    class Game(Scene):
        def setup(self):
            self.background_color = '#000000'
            self.btn = ButtonNode ('Rotate')
            self.btn.position =(100,80)
            def touch_began(self, touch):
            def touch_moved(self, touch):
            def touch_ended(self, touch):
            def handle_touch(self, touch):
             if touch.location in self.btn.frame:
            self.player = SpriteNode('spc:PlayerShip2Red')
            self.player.anchor_point = (0.5, 0)
            self.player.position = (self.size.w/2, 120)
            self.player.size = (20,20)
    if __name__=='__main__':
                run(Game(),LANDSCAPE, show_fps = True, multi_touch = True )

    Can anyone point me in the right direction ?

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!