TimerBehaviour ?

SDMGSDMG Member Posts: 280
edited November -1 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?


Sign In or Register to comment.