Howdy, Stranger!

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

TimerBehaviour ?

SDMGSDMG Posts: 280Member
edited 12:58AM in Tech Support
Hi, i have a problem with the Timer-Behaviour...

Please have a look at this scene:

The cube in the middle should change color and play a sound every x seconds. The value of x (= game.GameSpeed) is shown in left corner... in the rigth corner is the score that adds 1 point on every change. unfortunatly the speed doesnt increase as expected.

In the Timer-Behaviour i have inserted the global variable game.GameSpeed.
While the variable is constrained to the score with:

game.GameSpeed = max((1-( game.Score /100)),0.1)

so every (game.GameSpeed) seconds the score adds +1, color should change and play a sound...

The color-changes and sound should appear faster and faster from every 1 sec to every 0.1 sec.

Unfortunatly the Timer uses only the inital-value of 1. The speed is not increasing....(?)

Any Tip?


This discussion has been closed.