Timer Value

Lu_merlinLu_merlin Member Posts: 45
edited November -1 in Working with GS (Mac)
Hello everyone.
I don't understand how i can change the timer value. This is what i tried :
-------------------
Every 2 seconds change game.value to game.value-1

every game.value
Spawn actor x
--------------------
But nothing changes "x" always spawns the same. (and doesn't change every 2 secs)

pls help!

lu_merlin

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    you have to "trick" gs into checking that attribute before the timer fires each time.

    I have a demo called "timer with variable rate"

    Go into the New section of the GS creator start screen and type that in as it is in the quotes above. Then look in the spawner and you'll see how to do it. BE SURE TO CHECK ALL THE OTHERWISE SECTIONS!!!!
  • Lu_merlinLu_merlin Member Posts: 45
    thx i will have a look at it.
  • Lu_merlinLu_merlin Member Posts: 45
    I will just try it for my game but i don't know if i understand it.
    So how often is the interval changed to what?
  • Lu_merlinLu_merlin Member Posts: 45
    It doesn't work. I tried to copy everything exactly as it was in the demo
    even the one otherwise rule.
    is it important that gamespeed and oldgamespeed are global attributes?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Lu_merlin said:
    It doesn't work. I tried to copy everything exactly as it was in the demo
    even the one otherwise rule.
    is it important that gamespeed and oldgamespeed are global attributes?

    make sure that the starting values for those variables are the same as the demo.
  • Lu_merlinLu_merlin Member Posts: 45
    yes i did that
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    here's the thing. When you open up that demo I made you'll see that the purple squares are spawned at a faster and faster rate. So I know that this system will change the value in the timer. If it works in the demo (it does) then it will work in your game IF you copy it EXACTLY. If you do not have deep blue design's project merger then you will need to create all of the game and self attributes that are being used and set them to the correct values.

    You can copy the rules from the demo and paste them into your project, BUT you must create the attributes yourself in your project and go into the rules your pasted and add those attributes from the drop down menu in the behaviors. And check all the otherwise sections.

    Again, it works in the demo. If you copy it correctly it will work in your project.

    Good luck!
Sign In or Register to comment.