Forum rules - please read before posting.

Trouble with starting a scene with a timer

I have a timer system to calculate when player can have more hints in the game. There are four options in a toggle 0 (hints are off), 15 s, 30s and 60 s.

Here some pics:
https://imgur.com/a/TCrh6Ru

The count up is set to start from 45, 30 or 0 secs to have the 15, 30 or 60 secs. And the count up starting value is set in a variable 42. When player sets the hints on or loads a saved game this thing works fine. But when I start a scene fresh in Unity the count up value is not updated to corresponding value although the start AL is run.

I have U2022.3.8 and AC1.78.3.

Comments

  • You're running a Variable: Set timer Action in the fresh scene when it opens?

    What is the value of the Timer's variable set to?

  • It should get the value from TimerValue. It is set via script after player sets the options toggle value. So if player selects 15 secs the TimerValue gets 60 - 15 as a starting value for new timer start.

  • edited August 2023

    Timer's Max value is 60.

  • Timer is linked to NewHintCounter.

  • Try using the Variable: Copy Action instead of Variable: Set to transfer the value of TimerValue to NewHintCounter - does it work then?

    If not, enable comments in each of the Actions, and opt to display them in the Console (from the bottom of the Settings Manager). Are each of the intended Actions being run?

  • Copy doesn't change it. Funny thing, in comment the [var:42] works correctly, but the global variable is not set.

  • It doesn't even set a straight number 45 into it.

  • If the Action is running, but the variable is not being set, is a Timer already running? That will override the value.

  • Setting Timer not to start but to resume solved the issue. I just wonder why this only happens when starting a fresh scene...

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.