Setting obstacle height based on number of sprites

0 favourites
  • 3 posts
From the Asset Store
Obstacle Impacts and Cartoon voices, will makes your game more funny!
  • I've got an autorunner game with obstacles, and i wanted to know whether i could set my obstacle height based on the number of sprites rather than multiplying the obstacle height through expressions to generate the height (hope that made sense).

    Right now, how i've got it, it works fine with regard to the height that the obstacles spawn at but i'm not a fan of the sprites being clipped if the obstacle is spawned at something like 2 and a half sprites. This reduces what i can use as an obstacle as i'd have to use a seamless block to make it look any good.

    I've provided a capx file with obstacles so hopefully someone can help out.

    Basically, i wanted to so that my obstacles can be randomly spawned 3 sprites high, or 2 sprites high etc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • well your sprite size is 39 px, so why not just make the size to 39*random(1,x) ?


  • Thanks.

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