Change image after 1 second

GrubGamesGrubGames Member Posts: 77
edited November -1 in Working with GS (Mac)
I am having trouble changing an image after 1 second when colliding with another actor.

For clarity: I have a spinning animated actor that bounces when it touches a landing pad. I want the image to change from an animated spinning actor to a still image of the actor. As of right now the animated image changes every time it bounces on the pad. I want the image to only change when it is in contact with the pad for longer than 1 second. I have experimented with self.time but no luck.

Any help will be appreciated.

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    create a game boolean attribute called spinning

    when game.spinning is true
    --Animate
    Otherwise
    --change image to image.png

    when overlap collide with platform
    --After 1 second (uncheck run to completion)
    ----change game.spinning to false
    Otherwise
    --change game.spinning to true

    See if that works for you
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    When actor overlaps or collides with whatever

    timer after 1 second, run to completion NOT checked
    --change image

    and if the animation gives you problems use a atttribute to disable it

    cheers

    edit: damn you tendrmer ;)
Sign In or Register to comment.