Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

-

edited May 2012 in Questions Posts: 86

-

Comments

  • edited May 2012 Posts: 86

    -

  • BortelsBortels Mod
    Posts: 1,557

    Certainly. Look at the "CloudLevels" tab in the Lua Jump example, specifically the generatenextCloud routine - it sets the cloud's position, then sets nextCloudHeight to that position plus a random number.

    As for using a sprite, you'd replace the part of Cloud:draw() that draws the clouds - the two "for" loops - with a call to draw a sprite or sprites.

    Go ahead and try it! The examples are read-only, you can't break anything, and tweaking them and seeing the results when you run the program is an excellent way to learn.

  • edited May 2012 Posts: 86

    -

Sign In or Register to comment.