1. #1
    Member Follow User Gallery
    Join Date
    Jan 2007
    Location
    Paramount
    Age
    40
    Posts
    32

    Default How to multiply a function

    Hello all I think this might be very basic but I'm going to ask because I can't figure it out. All I want to do is take this function: [ISet,Tooleformation:Inflate,100] an make it happen ten times in a row then stop. Instead of having the function in the script 10 times I would like to have a script to tell it to run this function x amount of times. And have x controlled by a slider that sets the amount in increments of 10.

  2. #2
    Senior Member Follow User Gallery
    Join Date
    Aug 2011
    Location
    Mebane, NC
    Posts
    4,194

    Default

    Real easy to make it loop 10 times. Lots more work to create a slider and have that as an input..

  3. #3
    Member Follow User Gallery
    Join Date
    Jan 2007
    Location
    Paramount
    Age
    40
    Posts
    32

    Default

    Thanks for that working on the slider now I can't believe that I did not see that the first time around.

  4. #4
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    All you need to do is set the loop to the slider value. If you had a slider called "Times" the code would be something like this:

    [IButton, "Apply Inflate", "Apply inflate number of times set in Times slider",
    [VarSet, loopValue, [IGet, zscript:Times]]
    [Loop, loopValue,
    [Set, Tool:Deformation:Inflate,100]
    ] //end of loop
    ]//end of button

  5. #5
    Member Follow User Gallery
    Join Date
    Jan 2007
    Location
    Paramount
    Age
    40
    Posts
    32

    Default

    @marcus_civis thank you when I get a chance I will test that out all post my results.

Posting Permissions

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