User Tag List

Results 1 to 6 of 6

Thread: How to set random alterable values with specific digits?

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export ModuleUnicode Add-on
    daryuss's Avatar
    Join Date
    Apr 2012
    Location
    Italy
    Posts
    241
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How to set random alterable values with specific digits?

    For example, when we print a document, if we want it to print only the selected pages, we check: Print: pages 1-3-5.
    The same thing I would like to do with the random alterable values, but choosing the numbers I want.

    For example: every 1 sec | set alterable value A at Random (3-4-6)
    ....ecxluding 1-2-5!


    I have already tried with random range, but that is not my aim.

  2. #2
    Clicker

    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
    Aug 2014
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Two ways I would do is this:
    1st. I would use a list, with the desired numbers each being a string each. Then I would have an event pick a string at random, using the " Val( >Enter string here< ) ".

    2nd. I'd make it a loop.
    *Every second, start loop "whatever" 1 time
    *On loop "whatever" set alt val A random(5)+1 <-- note that the +1 is to ensure we don't get a 0.
    On loop "whatever"
    +Alt Val A = 1 - start loop "whatever" 1 time.

    Note that this would need to have an event/child event for all the numbers you don't like. You can even skip the whole loop part, and just make it a standard event, just have a seperate event that makes sure whenever the Alt Val A is a number you don't like, it runs a new random event.

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export ModuleUnicode Add-on
    daryuss's Avatar
    Join Date
    Apr 2012
    Location
    Italy
    Posts
    241
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    @RailedRobin:
    Thank you. But I thought it was simpler.
    So I have to add a lot of events, and in my tutorial, there are already too many.
    I tried with a formula like this, and a little bit I got there.
    Al_value_experiment.jpg

    It would be enough to find the sign to replace the plus sign to explain to the computer that it must randomly set the values from 11 to 16, and then sometimes set it to 31! (skipping the values from 0 to 10, and from 17 to 30)
    But that plus sign does not recognize it as an interval separation, but as a sum!

  4. #4
    Clicker

    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
    Aug 2014
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by daryuss View Post
    @RailedRobin:
    Thank you. But I thought it was simpler.
    So I have to add a lot of events, and in my tutorial, there are already too many.
    I tried with a formula like this, and a little bit I got there.
    Al_value_experiment.jpg

    It would be enough to find the sign to replace the plus sign to explain to the computer that it must randomly set the values from 11 to 16, and then sometimes set it to 31! (skipping the values from 0 to 10, and from 17 to 30)
    But that plus sign does not recognize it as an interval separation, but as a sum!
    Here's a quick example of how to do it with a list object. Hope this will help!
    Attached files Attached files

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export ModuleUnicode Add-on
    daryuss's Avatar
    Join Date
    Apr 2012
    Location
    Italy
    Posts
    241
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    @RailedRobin

    Thank you. I will need it. As soon as possible I will reply with the tutorial I am trying to create, so we can understand each other better.

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export ModuleUnicode Add-on
    daryuss's Avatar
    Join Date
    Apr 2012
    Location
    Italy
    Posts
    241
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This is the tutorial I am doing.
    Street Fighter example freak!
    If you want to check the behavior of the computer that I would like to obtain, download the example and then on the storyboard click directly on Ken stage (1). Go to line 329 and you will understand how I intend to set the behavior of the computer: When the counter life is greater than 75, Ken has to do the normal moves at random (value 11,16) + the shoryuken at random (value 31). When the energy meter is less than 75, Ken only has to do special moves (31-32-33).
    Note: rest assured that I am not going to create all the Street Fighter faithful conversion, because that would be a crazy job! But to create only the two levels of Ryu and Ken almost similar, and the two endings, is possible!

Similar Threads

  1. Replies: 5
    Last Post: 2nd September 2016, 01:35 PM
  2. Replies: 9
    Last Post: 15th February 2016, 10:50 PM
  3. Global Values & Alterable Values with same names
    By Gustav in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 7th November 2012, 06:15 PM
  4. Display values on screen from Alterable Values
    By mikeh in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 13th May 2008, 01:59 PM
  5. Alterable Strings and Alterable Values limit :(
    By Pedro Almeida in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 13th October 2006, 06:38 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
  •