dress-up

I'm making a dress-up
when I press a button repeatedly
another actor change image (img1, img2, img3 etc. ..)

thanks for the help
sorry for my english

Comments

  • dwibredwibre Member Posts: 192
    Have all the images on the screen but out of view.

    Create a rule when touch is press interpolate img 1 location to out of screen & iterpolate image 2 to location.

    Repeat the above for all other images
  • wolltywollty Member Posts: 102
    I did not understand
    I have a only button
    when I press this button several times
    every time anothers actors appears
    like this of hello kitty


    thanks
    sorry for my english
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2013
    You can do that by placing an actor on the scene and using Change Attribute self.Image to [some value]. For example, on your hair button, you would do When Touch is Pressed Change Attribute game.hair (integer) to game.hair+1. Then on your hair actor, you would do Constrain Attribute self.Image to game.hair. All of your hair images would be named 1.png, 2.png, etc.

    If you are going to have multiple changes (e.g. hair, clothing, shoes, etc.), you will want to concatenate the name of the category like this:

    Constrain Attribute self.Image to "hair"..game.hair and then have each image named hair1.png, hair2.png, etc.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • wolltywollty Member Posts: 102
    i made it!!!
    thanks tatiang
    you are great!
  • wolltywollty Member Posts: 102
    another question
    and do i make button reset

    thanks to all
    thanks to the forum
  • wolltywollty Member Posts: 102
    and when the cycle of button is finished
    how do you automatically restart

    thanks
    sorry for my english
  • wolltywollty Member Posts: 102
    i made it the reset button
    i made a reset button
    when touch is pressed
    change attribute game.hair to 0 (0 is image hair0.png)
  • wolltywollty Member Posts: 102
    I can not do
    how do you restart automatically
    when the cycle is finished
    (hair1.png, hair2.png, hair3.png ... to automatically restart hair1.png ...)

    thanks for your help
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Change Attribute game.hair to (game.hair+1)%5 where 5 is the number of hair images you have plus one.

    (0+1)%5=1
    (1+1)%5=2
    (2+1)%5=3
    (3+1)%5=4
    (4+1)%5=0

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • wolltywollty Member Posts: 102
    i made it!!
    thanks very much Tatiang
    it's perfect
    your are very kind to help me so simply
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    You're welcome. :)

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.