Danimeister4's Forum Posts

  • 6 posts
  • So I was able to fix it by adding this line of code and the snake sprite is 1 lower than the play area (play area is 96x96, while the snake is 95x95) and it is working now. Might not be ideal, but at least it's working.

  • After debug, found that one of the problems is that every instance gets the head boolean. Also the sprite is 96x96 so they are next to each other and there is collision with the first part of the body.

  • Tried something like this, but still not working.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • So I'm doing a snake game, added some modifiers whenever something is eaten, and everything is working except the eating itself part. Is it possible for me to do it with only one sprite called 'Snake' or not?

    I have a family called FSnake, in there is the sprite Snake and the family instance variables are: n, prevX and prevY.

  • Thanks, it almost works flawlessly.

    The problem now is that at the 3rd collision it won't change animation/mirror the frog.

    Frog has the following behaviors: Bullet, Bound To Layout and Follow.

    The Wall has Solid.

    Changed the Even sheet of the Frog:

    + Frog: On collision with Wall

    -> Frog: Bounce Bullet off Wall

    -> Frog: Set DirFrog to 1 - Frog.DirFrog

    ----+ System: Frog.DirFrog = 0

    -----> Frog: Set animation to "WalkRight" (play from beginning)

    -----> Frog: Set Mirrored

    ----+ System: Else

    -----> Frog: Set animation to "WalkLeft" (play from beginning)

  • First time it bounces off the wall is okey, but the rest is not happening. The value of Dir only changes once.

  • 6 posts