Timer won't work with Random/Changing numbers?

cwbh10cwbh10 Member Posts: 52
edited November -1 in Tech Support
I want to have a timer where every

Random(Time,Time/score):
*Action*

But this glitches and the attribute changed rises extremely fast. Note that score is default 1 so it is not dividing by 0.

I am quite confused to why this is happening and it is quite annoy as well.

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    You could make a new attribute and give it the value time/score

    Let's call it 'tiscore' ;)

    Then in your random expression, use random(time,tiscore)

    See if that works!

    QS :D
  • cwbh10cwbh10 Member Posts: 52
    No, same error occurs. It spawns MASSIVE amounts of my actor, makes my macbook lag xD. I just can't seem to find a way around this problem. :S

    Thanks anyways QuantumSheep!
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    1) Using random in the Timer behavior works only for the first time to set the rate.
    Details here: http://gamesalad.com/wiki/how_tos:gsc_variable_timer_speed

    2) the random function picks an integer(whole number) between the first number and the second number with the first number being the smaller number.
    See: http://gamesalad.com/wiki/interface_reference:expression_editor#random
  • cwbh10cwbh10 Member Posts: 52
    Thanks a bunch Cmonkey! This will really help me in my development in my game. Do you think automatic updating of the variable in the timer, will be implemented in the future?

    :)
Sign In or Register to comment.