How to make actors switch spots?

expired_012expired_012 Member Posts: 1,802
edited November -1 in Working with GS (Mac)
How do i make it so that I drag an actor of the other (so basically ow they are colliding), and then they switch places. So if i have a green actor and a red actor and i put the red over the green, I want the green to go to the reds place and the red to go to the greens place that i just dragged it on to. Thanks

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi artonskyblue, I've just done a small test; I've got Actor A swapping with Actor B OK, but similar rules in Actor A need to be put into Actor B for it to work the other way around. But it's a start for you, if you'd like me to upload it.

    ---------------------------------------------------------------
    Spiral Gyro Games

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    I'm off to Snoozeville soon, so here's the link for the test, if you like:

    http://gamesalad.com/game/play/64019

    Hope it helps.

    ---------------------------------------------------------------
    Spiral Gyro Games

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • expired_012expired_012 Member Posts: 1,802
    Thanks! That helped a lot!
  • expired_012expired_012 Member Posts: 1,802
    I tried applying the same rules to the green actor, but now whenever i grab one actor they overlap, and i am then dragging both actors. What could i have done wrong?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    I think you'll need two more game boolean attributes called, let's say, Actor1Dragged and Actor2Dragged. On the mouse/press down of actor1, make ActorDragged1 true and ActorDragged2 false, and make the swapping stuff via Actor1's Rules only when Actor1Dragged is true; similarly, the swapping in Actor2, only when Actor2Dragged is true, making Actor1Dragged false. I'll have a bash tomorrow evening if you like, if you haven't solved it by then.

    ---------------------------------------------------------------
    Spiral Gyro Games

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.