making game

TinobossTinoboss Member Posts: 37

i want to make a game where things are falling from the sky. but I want it so when they hit the floor they teleport back to the top. how do I do this. I have a floor actor and a sky actor

Comments

  • gamestudentgamestudent Member Posts: 504

    In your falling actor create a rule:

    When overlaps or collides with: Floor actor,

    Change attribute: Self.position.y To: (Whatever the Y coordinate is for your sky actor)

  • TinobossTinoboss Member Posts: 37

    thank you @gamestudent

  • TinobossTinoboss Member Posts: 37

    @gamestudent what would I do if I wanted the thing falling to teleport randomnly across the x coordinate but still teleport to my sky actor

  • TinobossTinoboss Member Posts: 37

    meaning it could fall from anywhere across the sky instead of the same spot every time

  • gamestudentgamestudent Member Posts: 504

    @Tinoboss In the same rule with the collide, create an atribute that says:

    Change attribute: self.position.x To: Random(x, y)

    With x being the minimum, or closest to the left you want it, and y being the maximum, or closest to the right.

  • TinobossTinoboss Member Posts: 37

    nvm I figured it out but thx @gamestudent

  • TinobossTinoboss Member Posts: 37

    thx lol

  • TinobossTinoboss Member Posts: 37

    i have another question doe, my falling object rapidly gains speed as it is teleported up to where you can beqarly c it, how do i make it so it stays at a constant speed

  • gamestudentgamestudent Member Posts: 504

    For the falling, I would imagine you have gravity turned on or acceleration as your falling behavior. Change this to a "move" behavior, and you should be good.

  • TinobossTinoboss Member Posts: 37

    k thx @gamestudent

  • TinobossTinoboss Member Posts: 37

    for the direction if i want down what would i put, srry btw im new

  • TinobossTinoboss Member Posts: 37
  • SocksSocks London, UK.Member Posts: 12,822

    for the direction if i want down what would i put, srry btw im new

    What have you tired so far ?

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

    @Tinoboss click the gear to the far right of your username to edit a post you've written (up to 24 hours later). That way you can avoid so many short posts all in a row.

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

Sign In or Register to comment.