Timer Help Please

part12studiospart12studios Member Posts: 620
edited November -1 in Working with GS (Mac)
Hi everyone, below is how i'm trying to create an increasingly fast spawn rate of objects coming down.. my hope is to get it to be faster and faster

I will want to get velocity the mix next, but before i do that, i feel I need to understand how to make the objects appear on the screen faster and faster over time. I can't figure out how else i could increase the spawn rate without a timer.

1. i have an actor "spawn_object"

2. in that actor i have a rule.. which is saying.. "stop spawning if player has 0 lives"

3. inside that rule i have a timer (the only one in the game so far) set to "every" game.objectspeed "seconds"

4. inside that timer i have two behaviors

- change attribute "game.objectspeed"-1 (the -1 will be modified with a more sloping math formula, but for now i'm just trying to get it to work period)

I have a counter on my screen that shows this value gradually going down.. all the while the rate of dropping stays the same.. it seems like the "e" next to the timer "every" field would indicate that this value can be updated continuously.. but for all my efforts the timer continues to listen to only the initial value given.

I would love to know another way to get this to work.

Comments

  • PeeCeePeeCee Member Posts: 107
    hi there mate.

    drop some code in here to get the ball rolling. might be easier to review and hopefully find the solution you need.

    cheers
  • POMPOM Member Posts: 2,599
    Yes , timers in GS do behave like you said ,
    One option is to use a rule instead of timer :
    Create a "self" attribute , call it "timer for spawning" - integer - leave its value 0 !
    Then make a rule:
    When "timer for spawning" = self.time%"game.objectspeed"
    Do what you want .

    although it is highly Not recommended to spawn a lot through out the game ..
    Give it a try .

    Roy.
  • part12studiospart12studios Member Posts: 620
    to PeeCee, I'm not sure how i can paste code in here from GS? I'm only aware of the GUI stuff. I could post a screenshot though.. is that how people share "code" from GS typically or maybe there is some "script view" somewhere?

    to P-O-M, I'm going to give this a go right now and see what i can do with it. i see what you mean about making a rule instead of a timer.. very cool! :) I'll report back asap!
  • part12studiospart12studios Member Posts: 620
    ok here is a screenshot of my spawn actor

    http://part12studios.com/Temp/
  • part12studiospart12studios Member Posts: 620
    Sorry I meant to also add, POM I meant to also include that i tried what you suggested but it seems like all i would get is one item to spawn.

    Also this is a major part of the game.. driving the difficulty up over time having things move faster and faster..

    i wanted to get clarity also. "Yes , timers in GS do behave like you said". In that validation, did you mean that once a timer value is put it is fixed and doesn't update? because I pretty much said both how i thought it should work and how it was working for me so far.

    Thanks! :)
    Caleb
  • part12studiospart12studios Member Posts: 620
    I found this link.. http://gamesalad.com/forums/topic.php?id=28219 for anyone who finds this thread

    i haven't been able to get mine to work, but this guy is definitely trying to do something in the same vein as what i'm trying to do..

    i may just have to start over because i have other stuff going on that might be obfuscating this issue
Sign In or Register to comment.