How do I make a group of sprites move forward a set distance

0 favourites
  • 5 posts
From the Asset Store
The collection includes pre-categorized selections that can be the definitive tone setting backdrop to gameplay.
  • HI, I have made a game in which whenever a button is pressed, the layout will refresh moving sprites forward a set distance. I did this no problem in a test capx. However when I try to do it in my main capx, it doesn't seem to work at all!

    Which is weird as originally the code was for the sprites to move to one of 3 random places, and that works!

    Please see a screenshot of the capx below to see what I mean:

    The code underneath, which has been disabled, works fine! Which is why I am mighty confused!

    Any help would be appreciated!

  • Have you set the layout event sheet to the correct one, not another sheet?

  • Hi, thanks it is the right sheet.

    For the life of me I can't figure out why it doesn't work, especially since if I enable the code underneath that executes fine

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well from what I can see that in disabled events the action little bit different but not big deal. You just can send your capx and I will investigate it for you.

  • Hey

    Thanks for the help.

    I figured it out - my game loop involved the layout being re-started on each iteration, which meant the sprites would reset to the original position each time!

    To get around that I originally changed my code to use the persist function, but now I have re-written most of the game to not need to reset the layout.

    Regards

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