Multiple animations in a single actor?

chaleychaley Member, PRO Posts: 226
edited November -1 in Working with GS (Mac)
I plan to have the Hero change animations based on different events. Setting up a basic rule for each event didn't seem to do the trick. Anyone know how to accomplish this?

This type of thing is a pretty important thing for certain types of games. If anyone had time to do a video/tutorial... I'm sure plenty of people would benefit.

Comments

  • chaleychaley Member, PRO Posts: 226
    I'm a little confused about what types of attributes need to be used to make things work. I get the "big picture" of what you are saying, but the details are still missing. What type of attributes are used?

    I'm still unsure about how GS understands new attributes that I create. You mentioned game.left and game.right (I understand that was just for example purposes) I just don't know how to set up new attributes that gamesalad will understand.

    When you say "animate" do you mean that I should use the "animate" behavior? (currently, I am using that "animate" behavior.)

    Thanks for helping me out on this btw.
  • old_kipperold_kipper Member Posts: 1,420
    You can use self number interger attributes to set up which animation in playing with rules to change the numbers in the attributes. And these can be set up to trigger both speed, direction, and which animation sequence is playing. You could also use them to flip the animation sequences horizontally or vertically.

    If you wanted to do this with a single set of numbers you might set up the self interger and then use a rule such as when self number interger = 0 then display images 'standing still' and change self speed x and y to zero. Then if self number interger = 1 then animate 'walk left' and change attribute self speed x to -40 and flip image Boolean to untrue. If the self interger was 2 then you would set things to animate and move positive x and flip the walk left graphics so they displayed correctly moving right.

    How the changed the number in the self interger attribute can be done with touch in areas, movement of the device, or a number of other ways.

    Hope that helps. Kipper
  • JPickardJPickard Member Posts: 477
    In the "new" section of the GameSalad launch window, search "Animation Test Fixed!" (without the quotes, of course.) Download that and study it. It should answer most of your questions.
  • chaleychaley Member, PRO Posts: 226
    Thanks guys... I'll go take a crack.
Sign In or Register to comment.