Touch system

SlightlyGrimSlightlyGrim Member Posts: 51
edited November -1 in Working with GS (Mac)
Hi

has anyone come up with a touch system, where if you touch anywhere on the screen the character moves to that point?

cheers

Slightlygrim

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    When Mouse button is Down
    --Move to mouse.position.x and mouse.position.y
  • SlightlyGrimSlightlyGrim Member Posts: 51
    Problem is I want the character to move by the touch as it will be an iPhone game and I'd like it to be constant so that if you moved your figure the character would move where your finger is.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Mouse and touch are interchangeable. Put that rule in and try it. Im willing to bet it is exactly what you want.
  • SlightlyGrimSlightlyGrim Member Posts: 51
    Yeah you are right, I didn't exactly want that but I think I figured it out, basically I have a second actor that states when touched change attribute "touch" to true and then the actor has a rule saying when "touch is true move actor to touch X and touch Y. so that where ever you touch on the screen the actor will move to it. Only issue I'm having now is that cause I have a scolling screen for some reason my character doesn't want to move above a certain position. I've tried moving the touch actor onto the non-scrollable screen but still the same issue. Any ideas?
  • SlightlyGrimSlightlyGrim Member Posts: 51
    When ever I do "move to" relative to the scene I get that stopping effect, but when I have relative to the actor he is able to work everywhere but only seem to walk in one direction. Just encase this helps
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    If your gonna do something larger than the screen then you have to also create an offset.

  • SlightlyGrimSlightlyGrim Member Posts: 51
    that it perfect, thank you so much
Sign In or Register to comment.