Drag actor to another actor and they change place!?

Andre_DaniAndre_Dani Member Posts: 22
edited November -1 in Working with GS (Mac)
I have a big problem! I have in six days tried to drag an actor and change place with another actor i hover over(or inside with mouse/touch). For example(when you change place with apps in the iphone). Thats how i want it to work.
Can someone help me or anyone know any good tutorial or with similar problem?
I get it to work but i have put some timers in my actor so after a few drag and drops it starts to jump in not accepting behaviors.

i´m starting to loose my mind! the timers and rules can someone start at the exact same time so i dont get it to work without a bug.
Please help me!?
Regards!

Comments

  • RHRH Member Posts: 1,079
    EDIT: I don't know why I just posted that. One sec.
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    It will take some playing with but, the best way will be using some sort of method to
    track your items x and y position with global attributes.

    This way you can use press or release rules (whatever works best for you) to make the change. By tracking positions you will know where to snap them to.

    It A is colliding with B AND touch is pressed

    when release happens
    move A to B's X and Y and
    move B to A's X and Y

    You will have to deal with some sort of only update position o.x seconds so that that you can swap last position instead of current postion

    There is a lot going on with what you want to do but that is a start.

    Also depending on the situation you may also be able to fake item swapping by only changing the image and the rules inside the actors.
  • Andre_DaniAndre_Dani Member Posts: 22
    hi thanks for the answer. But i have tried that. I need to have to timers one who triggers the pressed actor and one who triggers the touched inside. but it works maybe 10-15 times but sometimes the two timers go at the exact same time and the function fails. i starting to think that its a bug and that its imbpossible to manage this :(

    isn´t there any tutorial on this? or something similar?
  • Andre_DaniAndre_Dani Member Posts: 22
    Andre_Dani said:
    hi thanks for the answer. But i have tried that. I need to have two timers one who triggers the pressed actor and one who triggers the touched inside. but it works maybe 10-15 times but sometimes the two timers go at the exact same time and the function fails. i starting to think that its a bug and that its imbpossible to manage this :(

    isn´t there any tutorial on this? or something similar?

  • RHRH Member Posts: 1,079
    There is certainly no need for timers in this.
Sign In or Register to comment.