Make Action With A Timer ?

Discussion in 'How Can I...?' started by TheGameAppStudio, Jul 8, 2018.

Tags:
  1. TheGameAppStudio

    TheGameAppStudio Serious Boxer

    Joined:
    Nov 2, 2016
    Messages:
    927
    Likes Received:
    318
    Hi,
    I would like to know how to set action with a timer ? Say an action with 10 seconds powerup .It must show countdown when it reaches 5 seconds so that user/player can control their character based on that and would help them play longer.
    I know this could be done in defeated animation of action but i need exact timer settings.
     
  2. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Hey @TheGameAppStudio, I messed around with something like this a while back in BB V2.2.9 I think and there was something funky about the playback frame rate, but I did get it working okay in realtime.

    Ok, I've just checked my old game and this is what i did. I simply used 11 .png frames in total for my 10 second animation (0-10) and played around with the frame speed and timed it until it was exactly 10 seconds realtime. This for me worked out at a speed of 0.34. Now here's the oddity, when you drop in 11 frames into an animation, BB automatically sets 11 frames for playback, but my 10 sec animation stopped at something like 3 or 4 seconds and would not play through to 10 secs. I found by trial and error that extending the animation to 33 frames, allowed my animation to play the full 10 secs.

    This probably has something to do with the speed being 0.34, (a third of a second), so I had to triple the frames to get full playback. Anyway, it worked ok and that's how you can set a timer up in Buildbox. I guess if you only want to show a 10 second timer at 5 seconds, you could replace the first few frames with blank .png files, or show the first one as 10, then blanks until the 5 sec point.

    Screen Shot 2018-07-08 at 14.10.32.png
     
    TheGameAppStudio likes this.
  3. TheGameAppStudio

    TheGameAppStudio Serious Boxer

    Joined:
    Nov 2, 2016
    Messages:
    927
    Likes Received:
    318
    @Phill Mason Thank you.Will look at it and give an update if it didn't work as expected :p
     

Share This Page