Power Control by touch position

BrynjeBamsenBrynjeBamsen Member Posts: 188
edited November -1 in Working with GS (Mac)
Hi GS'ers

Iam making a game where i need to control my power/powermeter (much like cannon demo) But a whole different concept.

In the Cannon demo power is based how long time touch is pressed.
How do i make it so power = touch position?

I hope i make my self understandeble

Comments

  • AppsRacKAppsRacK Member Posts: 346
    use magnitude instead of time.
  • BrynjeBamsenBrynjeBamsen Member Posts: 188
    hi drahc

    Could you be a bit more specific!
  • BrynjeBamsenBrynjeBamsen Member Posts: 188
    PLEASE someone help!! :)
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    magnitude is in the drop down function menu.

    So let's pretend your canon point is X=100 and y=200 and you want to know how far away your touch is from that point.

    Create an attribute (real) game.magnitude

    Rule when touch is pressed
    constrain game.magnitude to magnitude(game.touch.1.X-100,game.touch.1.y-200)

    Now you can use this anyway you want.
Sign In or Register to comment.