L/R Animation with Movement Graphic Error
Hi Everyone! This is my very first post on the GameSalad forums, so try and be nice. =]
I am new to programming and GameSalad, but have watched a ton of tutorials and spent a lot of time reading through the forums. I am working on a simple game scene where my character can move left or right on the screen. While moving he should be animated so that it looks like he is walking. I have two invisible buttons on either side of the screen so that if you press on the right half he moves right, left, he moves left. I have everything working correctly except this this serious problem:
When the character is standing still, he flips between his standing pose, his right walking pose, and his left walking pose. It does this really fast so its just blurry and weird looking. It kind of looks like he is having a seizure. This is what I have so far:
Universal Attributes:
right - unchecked - boolean
left - unchecked - boolean
Player Attributes:
Grounded? - checked - boolean
FacingRight - checked - boolean
Timer - every 0.0 seconds - run to completion off
Rule:
game.right is true
game.left is false
Change self.Motion.Linear Velocity.X to 75
Rule:
game.right is false
game.left is true
Change self.Motion.Linear Velocity.X to -75
Rule:
game.right is false
game.left is false
change self.MotionLinear VelocityX to 0
Rule:
game.right is true
game.left is true
change self.MotionLinear VelocityX to 0
(These are all within the Timer Rule and he moves left and right just fine)
Rule:
self.MotionLinear VelocityX > 0
Animate (6 .png sprite images at 6fps, loop on, return actor on
Rule:
self.MotionLinear VelocityX < 0
Animate (6 .png sprite images at 6fps, loop on, return actor on
I even tried putting my two animate rules within the timer group and that made him stay on his straight on view, then when walking either direction, he switches between images so fast it looks all blurry as he walks. Any help you can give me is really appreciated. Please be patient with me since I am still learning the program.
Thank you!
I am new to programming and GameSalad, but have watched a ton of tutorials and spent a lot of time reading through the forums. I am working on a simple game scene where my character can move left or right on the screen. While moving he should be animated so that it looks like he is walking. I have two invisible buttons on either side of the screen so that if you press on the right half he moves right, left, he moves left. I have everything working correctly except this this serious problem:
When the character is standing still, he flips between his standing pose, his right walking pose, and his left walking pose. It does this really fast so its just blurry and weird looking. It kind of looks like he is having a seizure. This is what I have so far:
Universal Attributes:
right - unchecked - boolean
left - unchecked - boolean
Player Attributes:
Grounded? - checked - boolean
FacingRight - checked - boolean
Timer - every 0.0 seconds - run to completion off
Rule:
game.right is true
game.left is false
Change self.Motion.Linear Velocity.X to 75
Rule:
game.right is false
game.left is true
Change self.Motion.Linear Velocity.X to -75
Rule:
game.right is false
game.left is false
change self.MotionLinear VelocityX to 0
Rule:
game.right is true
game.left is true
change self.MotionLinear VelocityX to 0
(These are all within the Timer Rule and he moves left and right just fine)
Rule:
self.MotionLinear VelocityX > 0
Animate (6 .png sprite images at 6fps, loop on, return actor on
Rule:
self.MotionLinear VelocityX < 0
Animate (6 .png sprite images at 6fps, loop on, return actor on
I even tried putting my two animate rules within the timer group and that made him stay on his straight on view, then when walking either direction, he switches between images so fast it looks all blurry as he walks. Any help you can give me is really appreciated. Please be patient with me since I am still learning the program.
Thank you!
Comments
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Sorry for my ignorance.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS