THSIRTBOOTH help me with my game controls

diegocsdiegocs Member Posts: 531
edited November -1 in Working with GS (Mac)
i want an actor to follow my touch (move to where i touch the screen) without me having necessarily to be touching the actor. i tried to do: move to x=devices.touch.x and y=devices.touch.y (something like that) but the actor stoped following my touch when it reached the touch x and y postion.

Do you know how to fix this?

Comments

  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    I'd help but I'm not Tshirtbooth :P

    Ace
  • steve86steve86 Member Posts: 806
    I'd help too, but I'm also not Tshirtbooth :P

    Steve
  • ShaneS429ShaneS429 Member Posts: 77
    I'll help even though I'm not TSB. :D

    Try Constrain Attribute instead of Change Attribute.
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    You're Sheldon, not Tshirtbooth!

    Ace
  • dmilinovichiiidmilinovichiii Member Posts: 620
    I'm Tshirtbooth but I won't help.
  • ShaneS429ShaneS429 Member Posts: 77
    But Sheldon knows all!

    Bazinga!
  • mynameisacemynameisace Hull, UKMember Posts: 2,484
    BAZINGA!

    Ace
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    try doing using magnitude to determine a distance between the touch location and the actor and then constrain the velocities based on that and use max speed to keep it from going faster than your want. then when you touch it would move toward what ever point you are touching but then if you move your finger it will change directions. or speed up a little. I'm feeling a bit generous today. I may go ahead and make a demo of this if I can squeeze in some time.

    ___________________________________________________________________________________
    Project Help from Tenrdrmer Click Here

    GS BubbleBall Template HERE!!
    Stacks Level Selection Template HERE!!
    Expanding Option Menu Template HERE!!
    Tenrdrmer's Menu # 3 HERE!!
    Menu #4 - Level Banners HERE!!
    AppSolute Entertainment on Facebook
    AppSolute Entertainment on iTunes
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Here give this a try and see what you think. It will continue to follow your touch to where ever it goes and it speeds up as you get farther way and slows down when its close to the touch. Also when you stop touching it will stop where it is.

    http://gamesalad.com/ontheappstore/21743

    ___________________________________________________________________________________
    Project Help from Tenrdrmer Click Here

    GS BubbleBall Template HERE!!
    Stacks Level Selection Template HERE!!
    Expanding Option Menu Template HERE!!
    Tenrdrmer's Menu # 3 HERE!!
    Menu #4 - Level Banners HERE!!
    AppSolute Entertainment on Facebook
    AppSolute Entertainment on iTunes
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    That's really nice. What I like about this demo is the simplicity. I would have created a new attribute and constrained it to the magnitude blah blah blah...

    This is a good reminder that there is often a simple way using simple math to do some pretty cool stuff.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    scitunes said:
    That's really nice. What I like about this demo is the simplicity. I would have created a new attribute and constrained it to the magnitude blah blah blah...

    This is a good reminder that there is often a simple way using simple math to do some pretty cool stuff.

    Thanks Scitunes,

    I actually started to go that route but then I realized using magnitude will give me only one even number and if I put that number into both x and y velocities it will just move at 45 degree up and to the right.

    So I basically broke up the magnitude expression to find a value for x and a value for y.

    Also this is a good display of how linear velocity x and linear velocity y are related to a 90 degree triangle. I hate to go off in a lecture, but understanding these things will help with being more creative in how people can accomplish a task.

    ___________________________________________________________________________________
    Project Help from Tenrdrmer Click Here

    GS BubbleBall Template HERE!!
    Stacks Level Selection Template HERE!!
    Expanding Option Menu Template HERE!!
    Tenrdrmer's Menu # 3 HERE!!
    Menu #4 - Level Banners HERE!!
    AppSolute Entertainment on Facebook
    AppSolute Entertainment on iTunes
  • quantumsheepquantumsheep Member Posts: 8,188
    *I'm* tshirtbooth, and so's my wife!

    TSB :D
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    will the real tshirtbooth please stand up?
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    I would be lying if I said part of me just wanted to show him TSB is not the "only" person on the forum that can help with his problem. ;) Although since i'm also TshirtBooth I guess TshirtBooth really is the only one that can help. ;)
  • calvin9403calvin9403 Member Posts: 3,186
    This thread is weird
    according to tshirtbooth, there might be 6 billions of people name "tshirtbooth"
  • calvin9403calvin9403 Member Posts: 3,186
    @tshirtbooth(don't know which one)
    how many substitute do you have?
Sign In or Register to comment.