Forum rules - please read before posting.

Slider timer in a Mini-Game

Hello Everyone! Hope you are staying safe! : D

Im making a mini-game where the player has to perform a task every 5 or 6 seconds. I made the mini game work, but im having a lot of trouble with the timer. I´ve red many post about this subject, but i coudln´t made it work. Maybe because im not much experienced with AC/Unity yet.

The idea of the timer is simple, it is a countdown slider bar, and when the value reaches 0, i want the player to lose. But if the player was abel to perform the task before 0, i want the timer to star over inmediatly, and the minigame continues with a more challenging task and so on.

I don´t know much coding, is it posible to make it entirely on AC?

Thanks and cheers to all to those who will answer. And again im sorry for my broken english!

Comments

  • What is it specifically you're having the player do?

    The "Time" menu element type is meant for built-in timed situations such as Conversations and Quick-Time events. If your gameplay involves pressing a particular button in time, you could make use of the QTE system to set up a timer, and win/lose states automatically - see this tutorial.

    Otherwise, you can create a timed win/lose situation using ActionLists. On a very simple level, you could create a background ActionList / Cutscene that waits for e.g. 5 seconds and then triggers a separate "fail state" Cutscene.

    If an ActionList's When running property is set to Run In Background, it won't interfere with gameplay, and Engine: Wait Actions will simply become background timers.

    So when your timed sequence begins, you trigger that ActionList - meaning if the Player does nothing, the "fail" Cutscene will run 5 seconds from then.

    If the Player succeeds in this time, you then just need to call the ActionList: Kill Action at the beginning of the "win state" Cutscene to kill that background ActionList.

    To have a timed display, you can create a "Slider" menu element that has its value linked to a Global Float Variable - and then update that variable's value during the background ActionList.

    Replacing the single Engine: Wait Action with the following would cause it to go down by 0.1s increments:

    https://imgur.com/a/NyFq337

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.