How to flip an actor?

kielhansonkielhanson Member Posts: 12
edited May 2012 in Working with GS (PC)
Hi all.
I've just started my own project and it will have a lot of cards on the screen and when you touch and release a card (iPad) it'll flip over to reveal the other side.

I've been searching a lot but can't find how to do this or what rule to apply. I've tried changing the anchor points but it doesn't help for the rotate rule.

Can anyone help me out?
Thanks!

Best Answers

  • britto24britto24 Posts: 35
    Accepted Answer
    Hi kielhanson,

    I would use the animate attribute.

    Create Rule, When Actor receives touch is pressed...
    add attribute Animate (drag your flipping animation sequence inside of the animate attribute)

    This way, when you touch the card it will animate the flip to reveal the other side.

    This is if you have created an image sequence for you flipping animation...

    Hope that helps!
  • JohnPapiomitisJohnPapiomitis Posts: 6,256
    Accepted Answer
    Select the cards width attribute from the drop down in the expression editor. Theres no scale attribute its width and height, and you cant just type them in you ahve to select it

Answers

  • britto24britto24 Member Posts: 35
    Also, if you didn't want to use the animate attribute...I found this that might be helpful to you:

    http://forums.gamesalad.com/discussion/13/trying-to-create-a-card-flip-effect

    Good luck :)
  • kielhansonkielhanson Member Posts: 12
    Thanks for the reply - is that persistent / animate?

    when you say 'drag your flipping animation sequence inside of the animate attribute', is this something I'll have to create in Photoshop or After Effects? What should I export it as?
  • monkeysaladmonkeysalad Member Posts: 16
    If you dont want to create an animation sequence I think you can fake it pretty well with just two images - the front of the card, and the back of the card. Basically you scale the card in X down to 1% or so and then change the image to the back of the card, then scale the card back to 100% of X. That should make it appear to flip IMHO.
  • kielhansonkielhanson Member Posts: 12
    hmm, sounds like a good idea! but what rule should I use to animate it to becoming 1% in the X-axis? I'm still very new to this and it's taking me a while to find out what each of the rules does.
  • monkeysaladmonkeysalad Member Posts: 16
    I'm new too and I'm not looking at Gamesalad at the moment but I believe that would be an "Interpolate" behavior - for example rule: if card is clicked, then interpolate the card's attribute X-scale to 0 over .5 seconds.
  • kielhansonkielhanson Member Posts: 12
    I'm new too and I'm not looking at Gamesalad at the moment but I believe that would be an "Interpolate" behavior - for example rule: if card is clicked, then interpolate the card's attribute X-scale to 0 over .5 seconds.
    I can't seem to get that to work, I put 'x-scale' in the 'interpolate _______ ' field but nothing happens...
  • monkeysaladmonkeysalad Member Posts: 16
    I dont know if "x-scale" is actually an attribute (probably not), you have to actually locate the right attribute in Gamesalad.
  • kielhansonkielhanson Member Posts: 12
    edited May 2012
    Select the cards width attribute from the drop down in the expression editor.
    Thanks - didn't know what the expression editor was though I clicked on the 'width' attribute on the left side which lists all the actor's attributes and it pasted it in for me.
Sign In or Register to comment.