how to spawn in the x axis

adri chanadri chan Member Posts: 7

im trying to make an object spawn everytime it hits the ground, but everytime i try it spawns all over the screen I just want it to go randomly to left and right from the top of the screen.

Comments

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

    Do you want the object/actor to move back to the top of the screen or do you need it to spawn a different actor?

    What have you tried in the Spawn Actor behavior's X and Y position fields?

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

  • adri chanadri chan Member Posts: 7
    edited March 2015

    [IMG]http://i62.tinypic.com/4r88kx.png[/IMG]

    ok so i want the chimichanga to spawn everytime it hits the ground on top of the screen at random heres the pic for a better idea thank you c:

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

    Your answer didn't really clear things up so...

    Do you want the object/actor to move back to the top of the screen or do you need it to spawn a different actor?

    And without knowing how you have your rules set up, it's impossible to help you fix them.

    What have you tried in the Spawn Actor behavior's X and Y position fields?

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

  • adri chanadri chan Member Posts: 7

    ok i want the actor to spawn only at the top of the screen in the x axis only

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

    If your scene is 320 pixels high, then you could set the Y position in the Spawn Actor behavior to 320 (or 320 minus half the height of the actor you want to spawn if you don't want the actor to get cut off) and set the X position to whatever you like (e.g. random(0,568)). Make sure the Spawn Actor behavior is set to Relative to Scene, not Relative to Actor.

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

  • adri chanadri chan Member Posts: 7

    thank you and sorry im a newbie

Sign In or Register to comment.