Unconnected's Recent Forum Activity

  • Nevermind I found it.

    Max(a,b,c)

    Min(a,b,c)

    "max(a, b [, c...]), min(a, b [, c...]) Calculate maximum or minimum of the given numbers. Any number of parameters can be used as long as there are at least two."

    *************edit***********

    Yes thank you oosyrag

    I was posting this as you posted your message. I was searching for 'lowest' instead of 'min'. I am not sure how I found min, probably just by chance.

  • I have a Repeat loop. I have 2 variables to compare and I would like the repeat loop to repeat the lowest value. Is there a single expression that I can put in the Repeat condition so it can be:

    "Repeat: Lowest Variable1 | Variable2 times".

    I was wanting to avoid an unneeded variable and conditions, but know how to do it this way.

  • Ashely told me another way around it.

    "If you use the scripting feature, BigInt is now widely supported for high precision integers."

    I don't know enough about this feature right now. It will be something I have to look at later.

    construct3.ideas.aha.io/ideas/C3-I-1629

  • You do not have permission to view this post

  • I found a workaround, but I'm only going to say it pseudocode for now. It is a bit excessive, but will be accurate if done correctly. Most people won't need this, but a few will. I may post an example at a later time.

    You take your input and have it as a string instead of an integer. You then use mid() and loops to select each individual character in the string. You then make conditions and actions depending on what you want to do with it. You basically do addition, subtraction, multiplication and long division as you learned it in school. This allows you to do addition, subtraction, multiplication and division by using each individual number instead of taking the whole number into consideration at once. This means you will have to use int() and C3 built in math for the small in-range numbers. You then take the individual answers as you get them and set them to a string.

    Basically instead of using the built in math in C3 you're only using it for the in-range numbers(5-8, 1+2...etc). You must keep the variable a string, otherwise it may round. You are teaching your event sheet how to add, subtract, multiply and divide using the same logic that you used when you learned to do them on paper. Which means you may need to watch a video to remember how to do it on paper. I watched a video to check to see if I handled things correctly.

  • On Start of layout:

    -Loop " " from 0 to 15:

    --Add 9x10^loopindex to variable

    I am getting 10000000000000000 (length is 17) as a result instead of 9999999999999999 (length is 16). I assume it has to do with base but I can't figure out how to get the correct value. I get accurate results if looped less than 16 times though. The expected results should have as many 9s equal to how many times it loops.

    ***edit***

    For my project I don't think many users will be entering more than a 15 digit number. I may just limit how many characters can be entered or I may work around the limit. There will still be a limit if I worked around it but it will be a lot higher than 15 digits.

    Also when I changed the title of the post so it will be more accurate for other people and so others can learn from it too.

    Also a ^ is called a caret symbol.

    ====Edit====

    A solution is in this c3p, at least for multiplication, addition and exponents. I feel most people won't need it though and it will probably be better to use 'Add Script' and BigInt than to manually do it as I did.

    The C3P has a few examples on how to do a few specific things that most people won't need. Be sure to disable all groups except for the one you are looking at.

    dropbox.com/s/1v415k8h85jp2wa/Tutorials.c3p

  • Thanks that was what I needed. I read of using '|' to do it, but I have never been able to format it right so I thought it was wrong.

    I wasn't putting x= in the first variable and I wasn't using a boolean in the second value. Thanks again

    x=0 | x=3 | x=8 | x=9 equals 1 works perfectly.

  • Just wanting to know how to compare X to many values at once with one condition. I don't mean 'Make or Block'. I would like a string of values and not a condition for each value. I need to compare X to quite a bit of values that require the same actions and I don't want a huge list of conditions. Also 'between values' won't work because not all of the values are consecutive.

    Compare X to 0,3,...8 or 9

    Instead of

    X=0 or X=3 or X=8...

    ***Solved***

    dropbox.com/s/1v415k8h85jp2wa/Tutorials.c3p

  • I will edit my post to be clear. The wait was to reduce how many times function Y was called while waiting for function X to finish.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Function X:

    Create 1000 objects

    Function Y:

    If object count is less than 1000. -Wait 1 second. -Call Function Y

    Else Destroy all objects

    By calling Function Y inside of Function Y it gives you a loop that you can easily control. You have to be careful though that you don't create an endless loop. You can check this by adding a global variable and each time Function Y runs it can add 1 to the variable. This allows you to check in debugger how many times Function Y runs. When you confirm Function Y is acting how it should then delete the global variable. dop2000's would be more efficient though, but I think it has to do with how the logic is set up. I never messed with asynchronous yet.

    ***edit***

    The wait in Function Y was just to reduce how many times Function Y is called while waiting for Function X to complete. It isn't needed unless you just want a very small performance increase.

  • You do not have permission to view this post

  • I understand, that is what I needed.

    If you start at 100 and loop to 3 then the space isn't counted when it is added.

    If you start at 3 and loop to 100 then the spaces are counted and then the loop doesn't get to run enough times.

    You were right, you did answer that already. I must have been missing something before because it passed right by me.

Unconnected's avatar

Unconnected

Member since 6 Apr, 2016

Twitter
Unconnected has 1 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies