swapping actors like app icons
designerapps
Member Posts: 3
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
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
Maybe just don't switch the actors, but switch how they look?
Good luck!
adding the ability to constrain the amount of actors within another actor for instance a bejewelled game
jordan
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
I was also thinking about this. Here's my take on it:
Squeeze into position (demo)
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.
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