How can i make my actor face the way he enetred a scene?

2»

Comments

  • sonicm3sonicm3 Member Posts: 141

    Hi guys, yea thanks for that demo mate.
    i just really would love the old code fixed for educational purposes, love to see things that dont work fixed. ive posted the full code of the actor.

    Just to say, the actor is asigned a "facing right picture"
    ERROR: faces RIGHT when going through left door.

  • IceboxIcebox Member Posts: 1,485
    edited April 2016

    @sonicm3 in the movement rules no need to put else game.right/game.left to false , you have it set to false on the button if its not touched , and you have it set to false in the rule if game left is true and game right is false. You have two conditions that contradict , i think this is the problem.

    There is no need for the timer in the jump rule just put change attribute instead of a constrain in a timer , and put the accelerate behavior at the top and set its direction to 270 ( down) so it will pull you down.

    Another problem you will face with the way you set up your animations later on is that you have it set to animate when right is pressed , what about when you jump and press right , it will animate the walking animation on air. You dont want that , keep it organized put a rule inside if you want and put the animation behavior in it so

    Rule if game.right is true
    Constrain motion linear velocity x to 180
    (Rule inside, if overlaps or collides with ground animate )

    but this way you will have 2 animation rules on both left and right. thats why its better to have a seperate rule that says when overlaps or colides with block A and motion velocity is not = 0 animate . Just thought of explaining things that might face you in the future to keep in mind

  • sonicm3sonicm3 Member Posts: 141
    edited April 2016

    Okay thanks ice, i know the above code isnt great, but id love to get it to work. Yes thanks, i removed as above and just turned off the jump until we fix the issue just incase its interfering with it, but i will also change the timer to as you have said to when its working, yea good idea that
    but still no change as of yet with the error im getting with those changes, just incase you think im lazy waiting for answers lol, im working on this all my time too, trying different things.

  • sonicm3sonicm3 Member Posts: 141

    i think im going to just ript it out mate and use ur example.. it is going to work out better overall i think.

  • IceboxIcebox Member Posts: 1,485

    @sonicm3 you have both flip horizontally false btw

  • sonicm3sonicm3 Member Posts: 141

    ah yea just saw that thanks. Btw, what sort of jump command is going to work best to avoid any or little as possible future issues?

    when key press is "up is pressed down.
    ..

  • sonicm3sonicm3 Member Posts: 141

    Also, when i use the example i download mate, its great! but, how would i fix the issue, as soon as he gets to an incline, he wont go up up, falls back down?

  • sonicm3sonicm3 Member Posts: 141

    its ok i fixed with constrain

Sign In or Register to comment.