About random time!

v00d0v00d0 Member Posts: 143
edited November -1 in Working with GS (Mac)
Can i for example create a spawner with random timer i want from 0.1 to 1 second? with all the valors in between like 0.2 0.3 0.4 0.5 and so on..

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    The random function itself will only return integers. no decimals. So if you use random(0,0.4) it will always kick out a 0. Now Something you can try but i'm not sure if it will work is (random(1,10)/10) and that should return a value of 0.1 through 1.0 but thats just a guess I have not tried it myself.
  • v00d0v00d0 Member Posts: 143
    ye i tried to use the / operator but without () so i'm going to try now thanks.
  • v00d0v00d0 Member Posts: 143
    it work. :) thanks a lot
Sign In or Register to comment.