User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 17 of 17

Thread: random giving same result EVERY time

  1. #11
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Weird, using your method of random( X )+1 I've noticed patterns that loosely resemble each other but never the same exact # every single time. I too haven't heard of WarMachine's special functions doohickey before now but it sounds like I should check it out as well.

  2. #12
    Clicker Fusion 2.5
    Del_Duio's Avatar
    Join Date
    Sep 2008
    Location
    Cygnus X-I
    Posts
    919
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cfullerNY View Post
    how do I access time in expression editor? extension?
    Ah, sorry I can't remember exactly but I think it's one of MMF's built-in objects. A date / time object???
    I know there's a GetDate function to it though.

  3. #13
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fanotherpg's Avatar
    Join Date
    Jul 2006
    Location
    High Wycombe, Buckinghamshire, UK
    Posts
    3,665
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just use @timer@ - counts milliseconds of game running.

  4. #14
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,637
    Mentioned
    57 Post(s)
    Tagged
    3 Thread(s)
    If you use timer, it's pretty likely that the randomize function could be called at the same timer value each time, so I don't recommend that.

    If you place a date object in your frame you can access date and time properties from it.

  5. #15
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    cfullerNY's Avatar
    Join Date
    Oct 2011
    Posts
    356
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well this problem is now worse than ever - I am doing things like random(4) and getting literally the same result every single time
    awful

    I have tried using randomize(hour+minute+second) but that is causing the problem...

  6. #16
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    Fanotherpg's Avatar
    Join Date
    Jul 2006
    Location
    High Wycombe, Buckinghamshire, UK
    Posts
    3,665
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    have you tried random(2)+random(2)+random(2) ? it will give you result from 0-3.

  7. #17
    Clicker Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleInstall Creator ProUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    573
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Computers generally are poor at being "random". just using "random" you're likely to see more of a pattern than a random batch of numbers. Simpliest fix is to seed the RNG. As suggested by others and again Time is the most commonly used seed.

    However I'm suprised that you're constantly getting the same result. If you are seeding correctly you would definitely see a different result each time as the seed would change the offset of the randomizer so even if your system was incapable of generating a random number (see below) it would still return a different number due to the time change. Maybe you could post your code?

    I've seen an issue in the past which was caused by a mainboard fault. The system was unable to generate a random number. For example. Opening up solitaire would produce the same game each time. Its a long shot, but maybe you have some sort of hardware fault. Easiest why to test this is to build your app into a EXE and run it on a different system and see how the results differ.

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Random Numbers and expiring the result numbers.
    By Corlen in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 26th April 2013, 04:11 PM
  2. Some more random Klik questions (only 7 this time)
    By oldkliker in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 17th September 2011, 01:05 AM
  3. random time and x
    By solarstorm in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 18th May 2011, 09:17 AM
  4. Random background each time game is run
    By Srandy in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 3rd August 2009, 07:05 PM
  5. Random time?
    By Spyro23 in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 2nd December 2008, 08:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •