swapping actors like app icons

designerappsdesignerapps Member Posts: 3
edited November -1 in Working with GS (Mac)
hey guys im kind of new to game salad. But I was just wondering if there was a way to swap actors like icons are swapped on the iphone. I want to use this in a game were four actors are on the scene and can be swapped to any position and I cant figure out a way to do this.

ex. (1) (2) (3) (4) > (4) (1) (2) (3) > (4) (2) (1) (3) ect.

i have already set the moving behaviour of the actors to constraint to individual touches
Please help

Comments

  • IntelligentDesignerIntelligentDesigner Member Posts: 517
    You usually do this with arrays. It's very easy. But I don't think GameSalad can do this...
    Maybe just don't switch the actors, but switch how they look?

    Good luck!
  • designerappsdesignerapps Member Posts: 3
    ya I think you are right i have now tried around 4 possibilities and all how failed what do you guys think

    adding the ability to constrain the amount of actors within another actor for instance a bejewelled game

    jordan
  • A3MGA3MG Member Posts: 152
    Here is what I came up with.

    I used 4 variable to track some different stuff.
    1) What number was clicked on.
    2) Position.X of what was clicked on
    3) What number was dropped on
    4) Position.X of what was dropped on

    Then just a bunch of rules to swap the x positions of what was clicked on and what was dropped on.

    http://gamesalad.com/game/play/69039
  • designerappsdesignerapps Member Posts: 3
    thanks so much man im gonna try it out right now to see if it works the way i want to
  • A3MGA3MG Member Posts: 152
    Cool, let me know. It could use some more rules to make it work better so you can't drop it "between" two different actors. I would probably check distance betwen the dragging actor and the drop on actor to determine which one is being dropped on (instead of just collide).
  • JackBQuickJackBQuick Member Posts: 524
    Good demo, A3MG!

    I was also thinking about this. Here's my take on it:

    Squeeze into position (demo)
  • A3MGA3MG Member Posts: 152
    JackBQuick, very nice demo as well. Now that I look back at what designerapps requested, yours is better for what they wanted.

    I did more of a "swap" demo. I was thinking of adding some interpolation to move the numbers after they have been dropped.

    In some ways I like how your numbers move out of the way before the dragging one is dropped (and in some ways I don't). Might be neat to see a version or your where the numbers hold their positions until the dragging one is dropped, and then they all move into place.
  • A3MGA3MG Member Posts: 152
    Here is another idea for your demo. Why not specify the Y position of the one you are dragging around. That way when the user selects one to drag around, when they click/touch it jumps up to a set Y location above (or slighlty above) the other blocks. Then it would work kinda like a slider with movement along the X axis, but none along the Y.
  • JackBQuickJackBQuick Member Posts: 524
    @A3MG - You're right: there's something unsatisfying about how the actors move into place. It's like they're dragging their heels or reluctant to get to their destination.

    Unfortunately, it'll be a while before I can work on this again: I've got some friends coming into town for the next two weeks.

    See everybody soon :)
Sign In or Register to comment.