What should you do if a sprite doesn,t change direction?

0 favourites
  • 10 posts
From the Asset Store
Hand-animated Sprite Base for isometric game/animation development
  • There is a sprite whit the platform behavior that is supposed to move left and rigth when it collides whit another sprite and can jump. But it only changes movement direction when it jumps when it supposed to do it no matter if it jumps or not when it collides whit the sprites that is supposed to change it,s movement direction. What should you do?

  • Hi Calfuso ,

    Your post is not very clear. Are you saying your sprite do not "move left and right" when it collides with other sprites ?

  • Consider posting your capx. Indeed, your explanation is not very clear.

    Perhaps you could check the How do I FAQ and look for the keyword "Patrol" it will show a few examples of how to handle the change of direction for an automated sprite.

  • The sprite is supposed to move to the rigth whit the No Default Controls platform behavior and when it collides whit another sprite move to the left whit the No Default Controls behavior. Then when it collides whit the another type of the same sprite it collided whit move to the rigth whit No Default Controls platform behavior. Then it is supposed to do the same thing. Here is the events and actions:

    Event-Variable-"rigth-Action-Simulate Platform Pressing Rigth

    Event-Variable-"left"-Action-Simulate Platform Pressing Left

    Event-Sprite collides whit Sprite-Action-Set Value to "left"

    Else-Set Value to "rigth"

    The sprite doesn,t change movement direction when it is supposed to and only does it if it jumps after it has collided whit a type of the another sprite. What should you do?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • event: sprite collides

    sub event: sprite-action <> "left" then set value "left"

    sub event: else "right"

  • In this post i write the events and actions rigth. I have a sprite that is supposed to move left and rigth and can jump. The sprite is supposed to move to the rigth whit the No Default Controls platform behavior and when it collides whit another type of the same sprite it collided whit move to the rigth whit the No Default Controls platform behavior. Then it is supposed to do the same thing over and over again. Here is the events and actions.

    Event-Sprite collides whit another sprite

    Sub Event-Sprite-Variable-"rigth"-Action-Variable-Set Value To "left"

    Else-Variable-Set Value To "rigth"

    The sprite doesn,t move to the left whit the platform behavior when it collides whit the another sprite. It only changes movement direction if it has collided whit a type of the another sprite and jumps. It is supposed to change movement direction no matter if it has jumps or not. What should you do to make it do this?

  • I did not write the events and actions rigth in my other posts in this topic. This time i write them rigth. I have a sprite that is supposed to move to left and rigth and can jump. The sprite is supposed to move to the rigth whit the No Default Controls platform behavior and when it collides whit another sprite move to the left whit the No Default Controls platform behavior. Then when it collides whit another type of the same sprite it collided whit move to the rigtjh whit the No Default Controls platform behavior. Then it is supposed to do the same thing over and over again. Here is the events and actions:

    Event-Sprite-Variable="rigth"-Action-Simulate Control Pressing Rigth

    Event-Sprite-Variable="left"-Action-Simulate Control Pressing Left

    Event-Sprite collides whit another sprite

    Sub Event-Sprite-Variable="rigth"-Action-Variable-Set Value To "left"

    Else-Sprite-Variable-Set Value To "rigth"

    The sprite doesn,t move to the left whit the No Defualt Controls platform behavior when it collides whit the another sprite. It only does change movement direction if it jumps. It is supposed to move to the left whit the No Default Controls platform behavior no matter if it jumps or not. How do you make the sprite do this?

  • It would be much easier to understand your problem if you share your CAPX.

  • Here is my capx:

    https://www.dropbox.com/s/jckpsdx6f7bqo ... .capx?dl=0

    When you open the project you start at the layout and the location where the problem sprites are located. The player sprite is Sprite43. The sprite that is supposed to change direction is the varitions of Sprite70. The sprites that is supposed to make it change direction is the two varitions of Edgemarker4. The events and actions are in Event Sheet 4. To find the events and actions of Sprite 70 search for Sprite 70. When you preview the layout you start where Sprite43 are located. The two varitions of Sprite70 begins to move to the rigth whit the No Default platform behavior and when it collides whit Edgemarker4 moves to left whit the No Default Controls platform behavior. Then the two varitions of Sprite 70 doesn,t change moevment direction. I want to know how to make the varitions of Sprite 70 move to the rigth whit the No Defualt Controls platform behavior when they collide when they collide whit the Edgemarker4 again and then move to left and rigth over and over again whit the varitions of Edgemarker4. The events and actions of this is at the top of the Sprite70s events and actions.

  • You project size is 1GB???

    And you don't even bother naming your sprites properly?

    No, sorry man, I'm not downloading this.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)