MotherHoose - Question for you about Self.Image Changing

TouchTiltGamesTouchTiltGames Member Posts: 1,162
edited January 2012 in Working with GS (Mac)
So I've got your change image trickery working. But I'm having one small issue...

Before when I just used an animation sequence to move an arm down and another animation sequence to move it up on button presses, they both worked great with a 'MoveArmUp' and 'MoveArmDown' attribute. But now that I have it setup with a Change Image like this:

when game.movingArmDown = 1
Timer: For 1
Timer Every 0.1
Change attribute self.image to self.image+1

when game.movingArmUp = 1
Timer: For 0.8
Timer: Every 0.1
change attribute self.image to self.image+1

This works great, but only once (Arm down then Arm Up). I can then no longer Play/Move the arm back down again to repeat it. It gets stuck in the arm down position. This didnt happen before when it was an animation sequence. I've tried 'running to completion' on the timers, I've even tried changing the armDown =0 at the end, and even tried changing the image to the very first image in the Arm Up sequence again at the end. Oh and I've even got the two image sequences named 10.png - 17.png and 18.png - 26.png.

Is there something overriding in the change Image that I need to do?

Cheers!

Comments

  • MotherHooseMotherHoose Member Posts: 2,456
    you are using just 2 states for the movingArm attributes ?
    if the movingArm is only two states? are you using just one boolean gameAttribute? 0 for down 1 for up???

    when game.movingArmDown is 1
    --your Timer
    ----your Timer
    -----changeAttribute: self.image to self.image+1
    -----Rule: when
    -----Attribute: self.Image = 17
    -----change game.movingArmDown To: 0

    if the sole booleanAttribute or this doesn't correct things, I will try playing in a project and see if something else works … you have done a lot of good tries already!

    @};-
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Haha thanks MH, I will try this out and let u know. Cheers!
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Ok I have got it to continuously move up and down - i had a timer in the wrong spot, doh. Only issue im having now is that on the second go, I get the white/blank image. I'm trying to...tell it to change back to image 10 (the first image) but that doesnt seem to work. Anyway thanks for your help.
Sign In or Register to comment.