flip a coin

mnemicmnemic Member Posts: 49
edited November -1 in Working with GS (Mac)
how to swipe your finger on the screen and make coin flip, like heads or tails?

Comments

  • DrGlickertDrGlickert Member Posts: 1,135
    No idea how you plan to do this, but a simple way would be;

    Use a rule:
    When touch is pressed;
    Change attribute: game.Coin to Random(0,1)

    When touch is released,
    AND game.Coin = 0;
    Change image to HEADS (also can animate the flipping and it stops showing a heads)

    When touch is released,
    AND game.Coin = 1;
    Change image to TAILS (also can animate the flipping and it stops showing a tails)
  • RedlerTechRedlerTech Member Posts: 1,583
    you would have to use animation as GameSalad is not a 3D engine :( but with animations it should run fine
  • GamersRejoiceGamersRejoice Member Posts: 817
    You might be able to fake the animation using two images and interpolate.
  • old_kipperold_kipper Member Posts: 1,420
    I made a dice that you can make itself throw and I actually put the spots on an overlay that became visible when the dice landed. This allowed me to use the same animation for all six possibles. I then made some random rules based on time (not the GS random as I found it seemed a little predictable).

    With a 3d program that renders motion blur it hid which face was which and as the landing is so snappy the overlay appeared to be actually attached.

    Hope that helps

    Kipper.
  • JPickardJPickard Member Posts: 477
    Kipper: Genius!
Sign In or Register to comment.