How Do I Make an Actor Score A Point Every Time It Goes Up 100 on the y Axis?

uhyanauhyana Member Posts: 36
edited April 2012 in Working with GS (Mac)
I know how to make actors score points and all that but I can not figure this part out. My scene has gravity pushing this actor down and the user swipes it up to keep it from falling. What I want to figure out is how to score a point every time the actor goes up 100 on the y axis from the point before it is touched. After the actor will fall down and the user will swipe it up again and if it goes up 100 from the initial point before the user touched it would score another point and so on. Basically, how do I keep track of every +100 that the actor does on the y axis?

Best Answer

  • SoldierBullsSoldierBulls Posts: 61
    Accepted Answer
    Attributes;
    StartPos (Y pos when touch)
    Points

    If Devices.Touch.Count>1;
    Change StartPos= Self.Position.Y
    ---
    If Self.Position.Y>StartPos+100;
    Change Points= Points + 1

    I think that's all! ;) Best regards!!

Answers

  • uhyanauhyana Member Posts: 36
    Thank you so much, it worked! I just got out of calculus this afternoon and was trying to think of some crazy equation to do this, I guess a just over thought it.
Sign In or Register to comment.