How do I move a object then stop then move again

0 favourites
  • 12 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi,

    How i make this move

    I what to make a object move to a Random Location on screen, them stop show another frame for x sec then go away.

    i have this

    plug in moveto

    object moveto random(100,750), 192

    object se animation frame to 1

    system whait 5 sec

    object se animation frame to 0

    object moveto (-96,192)

    but dont work

    Thanks

  • What is going wrong ?

    The animation or the position of the objet ?

  • You could use the "on hit target position" condition of the moveto-behaviour..

  • the animation dont work as i like.

    Example i what the object when move to ramdom location stay red (frame 0) when stop stay green (frame 1) stay stop for 5 sec, then red (frame 0) to go away, the problem is that the object is already green, but when go away it works good it change to red

    moving(red) stop(green) moving(red)

  • You could use:

    Sprite Moveto is moving

    sprite set frame to 0

    else

    sprite set frame to 1

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok its works but i have other problem, and if i have more than one of this Sprite they only go away when all sprites are not moving, i what that they work individual

    on start layout sprite moveto random(100,750), 192

    sprite is moving set animation frame to 0

    system else

    sprite set animation frame to 1

    whait 5 sec

    sprite moveto (-96,192)

  • Add a "system for each sprite" - condition

  • how i do that?

    i change the on start layout sprite moveto random(100,750), 192 to

    for each sprite sprite moveto random(100,750), 192

    but not success , the sprite dont stop and stay a little crazy moving right and left

  • I would suggest you share your events and/or capx..

    The thing you are trying to do shouldn't be hard, so it might be conflicting events..

  • can you send your email

  • the thing that looks like a gear in a clock, construct symbol? click that click ''for each'' as a 2ndary condition. this will make it for each of that object.

  • You were setting the target every tick to a random position..

    So every tick the target changed..

    I've send you a pm with corrections..

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