Does ANYBODY know how ti fix this. Someone please?

QbAnYtOQbAnYtO Member Posts: 523
edited November -1 in Working with GS (Mac)
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.

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi QbAnYto, try the following: first, for your standing graphic, replace the prototype actor's image with the right facing image.

    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

  • diegocsdiegocs Member Posts: 531
    maybe make an attribute like ActorDirection, when start ActorDirection = 0 , when ActorDirection=0, actor faces foward. When left key pressed change ActionDirrection to 1, when Actordirection = 1 do left animation, same fo th e right but change attribute to 2

    Edit: gyroscopes answer is better
  • QbAnYtOQbAnYtO Member Posts: 523
    actually guys thats somewhat what i did.

    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....
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    You're doing right by the sound of it, don't know why it's not working though. Make sure the boolean attributes FacingLeft and FacingRight are Game attributes. In the actor, right at the beginning, when FacingRight = 0 then your Animate Behaviour. I can't see why that wouldn't work...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Try this

    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.
  • QbAnYtOQbAnYtO Member Posts: 523
    thanks guys. i will try this later on... however what if i create a NEW replica actor only animating the standing right animation that i'm trynna have there at the beginning of every scene right? and have that new actor get destroyed once i press left or right?

    i gotta give these things a shot....
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    The actor itself is not destroyed, but you could say that the image is. So when the left button is pressed and released you have your left-facing actor graphic, then that's replaced when the right button is pressed.

    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

  • QbAnYtOQbAnYtO Member Posts: 523
    Great. Thanks. I guess you are right. I fixed all my issues by myself (in a sense that fixed them before reading the responses to my questions.) and i do thank u guys for ur help. I just want him to already be animated when the level starts. I guess I have to work around it. Find a way for the player to tap left or right before the level starts to initiate the animation. Kinda sucks but if that's what I have to do then I'll do it. Hell who knows. This "sacrifice" might lead to a good idea lol
Sign In or Register to comment.