spawn and place

solitaireesolitairee Member Posts: 73
edited November -1 in Working with GS (Mac)
Hey, I already know how to spawn an actor and how to drag and drop the actor as well...
What I cannot do :/ is how to spawn the actor and instantly move and place it with drag...
I mean
touch pressed
actor spawned
moved with drag
dropped after released touch

ty

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    you will probably have to either do a second touch because if you never lift off the actor when its spawned you have never technically touched it.

    Or you could try using when touch is inside on your spawned actor and then constrain the x and y to touch 1
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Yes when touch is pressed spawn actor. You might need to play around with some attributes to get the spawn, or a work around is place a invisible actor over the whole scene. Have a rule inside the invisible actor when touch is pressed spawn actor. Then for the spawn x position have touch 1 x, and in the spawn y position have touch 1 y. Then in the actors your spawning have a rule when touched is pressed, hit the plus sign on the right of the rule in there and that will make another rule in the same instance, and make the second one when touch is inside. Make sure its when all conditions are valid and not any. Then in that rule for when the touch is pressed and inside, have interpolate position x to touch 1 x, and then interpolate position y to touch 1 y.

    That should do it, let me know if you need more help
Sign In or Register to comment.