How do I move a sprite to another position?

  • Total noob question..

    If I have a sprite at position x,y and I want it to slide down to y+300 at a particular speed then wait a moment then slide it back up what behaviour do I use for this?

    I am talking about moving it at a particular rate to a relative y position, not a set coordinate or object

  • Give the sprite a bullet behavior, set the speed either in its properties or via event.

    Then all you need to do is use the bullet actions for angle and direction and set speed to 0 to stop so you get the effect your after.

  • Thanks, having difficulties still..

    Setting angle turns the sprite, and there is no set direction?

    Can you give me an example of how I would move the sprite y+600 without altering the angle of the sprite using this behaviour

    EDIT//

    Finally got this figured...

    Disabled Set Angle in objects properties stopped the sprite rotating then turned my head 90 degrees to the right so that my brain and the screen worked at the same angle (0 degrees is to the right?)

    Wow...I never thought construct 2 would be so much... fun.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use the "DistanceTraveled" of the bullet. Set the angle of it then compare values.

    System > Compare two values: First value: Sprite.Bullet.DistanceTravelled

    Comparison: Greater or equel

    Second: 300

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