Spawner with random position

ronreronre Member Posts: 38

hello,
im using iphone 5 portrait and im trying to make a specific actor spawner range (like 10 from the top and 10 from the bottom. saw this tutorial:

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    What is your question?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • myu699myu699 Member Posts: 96

    do you mean you only want the spawner to move on the x axis? In that case you can create a timer: every (whatever number)
    do: change spawner self.positionx. to random(min,max)
    the random is in the functions part

  • ronreronre Member Posts: 38
    edited March 2015

    hey,
    i already use random position but if i am putting random(1,3000)for example, its move in the all screen. i want the spawner effect to be in specific range.. better explain it like box with specific height and the spawner move inside..
    thanks

  • myu699myu699 Member Posts: 96

    oh ok. What you have to do is set both a random x coordinate function and y coordinate function
    like self.posiitionx = random(min, max)
    self.position y = random(min max)

Sign In or Register to comment.