Tap to make a object move

castmemberzackcastmemberzack Member Posts: 6
edited November -1 in Working with GS (Mac)
I am working on an app and I want to have it so a certain amount of taps wins. How do I do this? Is their tut or something? Or is it even possible?

Comments

  • RedlerTechRedlerTech Member Posts: 1,583
    Of course this is possible :D If you want this is how I would do it.

    Create an integer attribute at 0, call it Tap Count
    Create A boolean attribute starting false, call it Won?

    Go into your "player" & create a rule. When touch is released change game.tapcount to game.tapcount+1

    Then make a rule saying when game.tapcount is 10 (you pick this number), change game.won? to true.

    Make a rule when game.won? is true do something like change scene to game over :D

    Enjoy,
    Matt

    _________________________________________________
    Full Game Creation Service
    1 On 1 Project Help
    1 on 1 GameSalad Tutoring
  • RedlerTechRedlerTech Member Posts: 1,583
    Your title says "Tap to make an object to move".

    Use the same attribute game.tapcount

    When game.tapcount is 1 Move To (It's a behavior) put an X & Y location

    When game.tapcount is 2 Move To (It's a behavior) put an X & Y location

    Enjoy,
    Matt
  • castmemberzackcastmemberzack Member Posts: 6
    Im confused. Can you make it steps please. Like I got the first part but.. let me explain better.

    I want a object go up when its tapped I. i want it to move a certain amount every tap. get what Im saying?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    First make a new game attribute. Make it a real type attribute, and name it touchmove (or name it whatever you want, the name doesn't matter).

    Next In the player you want to tap to move up have this:

    a rule when actor receives event touch is pressed

    put a change attribute behavior in that rule and change attirubte touchmove(or whatever you named it) to self.position.y+30

    then under the change attribute behavior in the same rule put a interpolate behavior, and interpolate attribute self.position.y to the attribute touchmove

    you can change the 30 in the +30 to however many pixels you want it to move up each time its tapped, and change the duration in the interpolte behavior to adjust the speed it moves

    cheers
  • castmemberzackcastmemberzack Member Posts: 6
    Still doesn't work. Is there a TUT? I need steps. I get very confused very easily.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    i listed everything step by step what you need to do exactly. If you dont understand that, then check out the gamesalad cookbook videos and get familiar with the software and the way it works. Hope i dont sound rude, i just dont know how much simpler to explain it.

    ill make you a demo when i get home
  • castmemberzackcastmemberzack Member Posts: 6
    Thank You soooooo much.
Sign In or Register to comment.