Spawn at random coordinates bar a small subset of coordinates

mdtajghorimdtajghori Member Posts: 24
edited May 2012 in Working with GS (Mac)
Hey guys, another question from me!
So I wanted to spawn my actors at the other side of the screen (fixed x coordinate but random y coordinate) once they reach an x coordinate of 0. Now when I say that the actor needs to spawn at a random y coordinate, I want to exclude a small range of y coordinates (300 to 340). The closest example to this I could find was this video http://gshelper.com/how-to-make-moving-clouds-with-out-using-wrap-in-gamesalad-tutorials-video/

Now how do I exclude those y coordinates (300 to 340) from the randomly generated y coordinates. If I do this

change attribute.self.position.y to random (0-640), what expression do I need to add to exclude y (300 to 340)?

Answers

  • mdtajghorimdtajghori Member Posts: 24
    Can I somehow use the tables to do this?
  • mdtajghorimdtajghori Member Posts: 24
    Hey @tshirtbooth I should have mentioned the resolution I'll be using is 960x640. But I got it to work from your website, gshelper.com using tables. Thanks for all the tutorial videos!
Sign In or Register to comment.