Doing game lives question

I have a question If Actor collides with ground then change attribute game.lives to game.lives-1 BUT since the actor starts on the ground you instantly run out of all lives, do I need to set something like when Game.jump is true then game.lives = true otherwise game.lives = false?

Another quick one the actor sits on the ground then when jump is active an animation is active but the actor seems to spaz every few seconds while sat on the ground thus losing a life, I have the normal bounce when actor collides with ground, is there something extra I'm missing to stop him having a fit on his own accord?

Comments

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    edited June 2013
    not sure what your game mechanics are, but how about the game.lives is set to 2 at the start... it will lose one initially... then be ok... if it comes in contact with earth again it will be 0 (the game.lives attribute would need to be integer or real, not boolean for this).

    Otherwise yes having a rule that remains true (i.e. game.first_jump) until the first jump would stop instant death and misery...
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    edited June 2013
    For the 'spaz' moments to do with the jump action, what rules have you got in place to start that animation? .... could it be linked to an attribute called something like 'jump active'... or perhaps link it to 'if velocity on the Y is greater than something (.2) then play jump animation.
  • CoolBeeCoolBee Member Posts: 81
    Hiya @StormyStudios.com I currently have it so when Jump is True then Interpolate Self.motion.linear velocity Y to 200 and animate flap, otherwise animate flying animation, Then I have attribute self.motion.linear velocity T = 0 then change the image to "sitting image" but it also seems to be vibrating between the sitting image and the flying animation
Sign In or Register to comment.