Animation help

kajutokajuto Member Posts: 314
edited March 2012 in Miscellaneous
Hi everyone .! Recently I made 3 actor, one Left Button , second one Right Button and third one is a character, when the first two actor touch it will move left or right and it's fine but I want to put a Animation Behavior of the character simulating that is runnin either left or right. Where should I put the animation behavior and how? Please explain step by step please

Comments

  • calvin9403calvin9403 Member Posts: 3,186
    when left button touch is pressed

    animate


    you;ll have to draw the character;s animation yourself though
  • kajutokajuto Member Posts: 314
    I did that it animate the character inside the button.... The 3 actor are separate.... Isn't the left button same as the character
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    edited March 2012
    @Kajuto .. You can also download the free tool box created by p-o-m. I contributed a section on jump, double jump and it shows how to control the various animation states etc. Theres also lots of super useful stuff in there.

    Link - http://forums.gamesalad.com/discussion/38132/gs-tool-box-a-free-mega-template-ready-now/p1
  • MotherHooseMotherHoose Member Posts: 2,456
    edited March 2012
    you will need to tell the computer what to do with a gameAttribute … index type … name something like touchFlow
    0 = stand still
    1 = run Left
    2 = run Right

    on leftButtonActor:
    Rule: when
    Event: touch is pressed
    --changeAttribute: game.touchFlow To: 1

    ah … here is a demo:   http://www.mediafire.com/?rgel884lpf3myb9

    (sssh! I swiped two images of the little blue guy from GS Platformer Template … don't tell @SSS … I am in enough trouble!)

    @};- MH
  • kajutokajuto Member Posts: 314
    jjajajjaaj thanks everyone! by the way, i set a timer same as the tutorial of T-shirtbooth but it goes show second goes to 0, i want the display text show the minute instead of second, how can i change that?????

    Timer Actor
    -display text
    - abs(prec(game.my Timer,1))
    -change att
    - gamestarttime to game.time
    -Rule
    -Att gamemytimer > 0
    -constrain att
    -game.mytimer to 40-(game.time-gamestarttime)
    -Rule
    - Att gamemytimer=0
    -Timer
    -after 2 seconds
    -pause game

    all that code show from 40 second to 0 and show a pause scene, but i want the display text show the minute to 0 ...help??
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    If you're timer is only 40 seconds why do you need the minute? Just put a dummy zero in front of it.
  • kajutokajuto Member Posts: 314
    But some scene I want to make it 2 minutes ... How should I
    Do it ?
  • kajutokajuto Member Posts: 314
    Instead of 0:40 second I want to show it like this 2:00s let say..
Sign In or Register to comment.