GameSalad

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 4:23PM in Tech Support
Hi, i have a problem with the Timer-Behaviour...

Please have a look at this scene:

http://gamesalad.com/game/play/24918

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?

Comments

This discussion has been closed.