How do I make a button accelerate my actor (car)?

zSuperChargedzzSuperChargedz Member Posts: 19
edited March 2012 in Working with GS (Mac)
I'm trying to make a button accelerate the car. How do I make it so when I press the button on the screen it accelerates the car forward? How do I connect the two?

btw I have the button on the screen and the car rotates with my joy stick, but how do I make it so the button accelerates it? (also it would be great if you could also tell me how the other button brakes the car)

Best Answer

  • JohnPapiomitisJohnPapiomitis Posts: 6,256
    Accepted Answer
    You connect the two with game attributes.

    Make a game attribute called go, make it a boolean.

    In your button have when touch is pressed
    -change attribute go to true
    Then in the otherwise section of that rule put a change attribute behavior and change attribte go to false.

    Then in your car have a rule when attribute go=true
    -accelerate

Answers

Sign In or Register to comment.