Randomising seconds with a decimal

Uninspired_ProductionsUninspired_Productions Member Posts: 39
edited November -1 in Working with GS (Mac)
Hi Guys, Ive had a look in the threads and can't seem to find anything that astutely answers my query. Im all solid on randomising numbers, but I was actually wanting to randomise a timer to the decimal point. Has anybody had experience with this that may be able to throw the solution my way?

Appreciate any help I can get, Thanks.

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    according to the sites wiki - http://gamesalad.com/wiki/interface_reference:expression_editor

    `
    Random:

    Usage: random(x,y)

    Generate a random integer equal to or between the first integer value and the second integer value.

    Example: random(1,10) can be any number from the set of {1,2,3,4,5,6,7,8,9,10}.
    `
    I have used a decimal before in the random function but I do believe it will always round the decimals to an integer

    image
  • Thank you so much! This is O-mazing...
  • So along that same reasoning, could i have
    every random(1,3).."."..random(0,9) seconds, complete this action?
  • Oh well, still, very helpful, thanks!
  • Rob2Rob2 Member Posts: 2,402
    Why text ? you can catenate real attributes but surely random(1,3)+random(0,9)/10 makes more sense.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Rob2 said:
    Why text ? you can catenate real attributes but surely random(1,3)+random(0,9)/10 makes more sense.

    Nice, I love When theres a conversation to actually solve something. I like that Rob!
Sign In or Register to comment.