Spawn and move to finger.

TheBoss_123TheBoss_123 Member Posts: 60
edited November -1 in Working with GS (Mac)
Hey Forum,
Just needed a bit of help in this:
You touch an actor and a different actor is spawned, you can move this actor anywhere on the screen and then leave it there. This is all done in one touch.
I have made an actor spawn but i cant make it follow the finger.
Cheers
TheBoss_123

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Make a attribute called spawnfollow or whatever you want to call it. Have it set to 0

    Have a rule in the actor you want to touch to spawn the other one when touch is pressed change spawnfollow to1

    Have another rul when spawnfollow=1 spawn actor

    Have another rule when mouse button is up change spawn follow to 0.

    Then in the actor your spawning have a rule when spawnfollow=1 constrain self position x to mouse position x and constrain self position y to mouse position y
  • TheBoss_123TheBoss_123 Member Posts: 60
    Hey,
    I found a demo of it but it uses attributes e.g
    Game.Touch and i dont have these, how can i make them
  • mattyr64mattyr64 Member Posts: 82
    you don't need to make them, click on the attribute drop down, and choose 'device' then 'touches'
Sign In or Register to comment.