Does ANYBODY know how ti fix this. Someone please?
QbAnYtO
Member Posts: 523
ok so i'm still having issues...
i added the "press left key" rules..
so heres the break down:
i have 4 animated sequences all correctly initiated...
stand still right (animated eyes)
stand still left (animated eyes)
walk right (animated running)
walk left (animated running)
thing is, when i start the game, he is facing left automatically. i want him to face right.
when i walk left OR right the animation is in combination so the animation has ALL frames (left, right and still) so it looks like he's having seizure! not good!
i tried different forms of grouping, rule orders and all that. i created a boolean attribute (like the tutorial).
nothing is helping...
basically i want him to START in the stand still animated position facing right.
When pressing right/left to animate correctly (running to said directions)
and if i let go of left key, he will stop running ofcourse but will STAY standing facing left (animated) and same for when i let go of the right key, he will stay standing animated but facing right.
i added the "press left key" rules..
so heres the break down:
i have 4 animated sequences all correctly initiated...
stand still right (animated eyes)
stand still left (animated eyes)
walk right (animated running)
walk left (animated running)
thing is, when i start the game, he is facing left automatically. i want him to face right.
when i walk left OR right the animation is in combination so the animation has ALL frames (left, right and still) so it looks like he's having seizure! not good!
i tried different forms of grouping, rule orders and all that. i created a boolean attribute (like the tutorial).
nothing is helping...
basically i want him to START in the stand still animated position facing right.
When pressing right/left to animate correctly (running to said directions)
and if i let go of left key, he will stop running ofcourse but will STAY standing facing left (animated) and same for when i let go of the right key, he will stay standing animated but facing right.
Comments
You need Rules for FacingLeft and FacingRight, to use a Change Image Behavior to the appropriate images.
If you open the Player's Rules in the Platformer Template (found when you click the New button in GS), it's all there for you to study; or even use as your gamefile, replacing the necessary images, platforms and sounds, etc. Hope that helps. :-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Edit: gyroscopes answer is better
i created attributes like facingleft and facing right and mixing those with rules and such i was able to pull it off.
now my issue is when the game START he is just in a STILL (face right) frame. its only after i release left or right that he starts to animate. reason being was because i added:
key (right) released
set facing right value to 1
set facing let vaue to 0
animate the standing facing right animation
Key (left) released
et facing right value to 0
set facing let vaue to 1
animate the standing facing left animation
the animation consisits of his eyes blinking which is why its important that after i release the direction buttons (left and right) and he STOPS the running animation, he will face the direction he was last running to. i fixed that....
but now i'm trying this.
when facingleft value equals 0
when facingright value equals 0
animate the standing right animation
but its not working he s just still...frozen...lol
am i missing something small? everything is fine and responsive with the exception of the game start... the game starts and he's there...frozen..no blinking... then when i move to ether direction the game runs flawless...its just that FIRST state when the level begins, i need him to be facing right AND animated....
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
For facing left: Have a rule when attribute motion linear x< 0, then have your animation behavior for left in there. Then have another rule when attribute motion linear x>0, then have your animation behavior for left in there.
Then have another rule when attribute motion linear x= 0, then have your animation behavior for the standing still animation.
Make sure you have loop checked, but restore original image unchecked. Tell me if that works for you, and ill tell you the rest.
i gotta give these things a shot....
I strongly advise you to study the player (main character) Rules in the Platformer Template; it sounds like you're trying to "reinvent the wheel" here! That's commendable, and you learn a lot that way, especially through trial and error/mistakes but you learn just as much, if not more, by studying and implementing Rules that are already proven and work.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps