My global values are rounding in strange ways

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hey, I've been using MMF for several years off and on, I haven't used it in a few months so I'm a little rusty but I shouldn't be this rusty. I was working on an app when I hit a snag and couldn't figure it out so I created a completely new app to see if it was an issue with part of my code. This new blank app has only the following properties

    GV a = 3.5
    GV b = 0
    GV c = 0

    Always --> set GV b to (GV a)/2
    Always --> set GV c to sqrt(GV a)

    Before I even run the frame, GV a does some kind of auto round and sets itself to 3. With the frame running, I check the global values and GV a is 3, GV b is 1, and GV c is 1.732.

    My question is, why are my global values rounding like this? Is this just something I've never noticed before?

    I'm confused why GV a is jumping to 3 before a frame even begins, why both A and B are rounding down at *.5, and why one formula yields me a proper value (GV c) and the other does the weird rounding scenario. Any help is appreciated. I know this is probably a simple fix but I'm about to start losing hair over it.

  • Global Values may only be integer values during edittime. If you set one to something like "3.5414" it will round to 3 after the respective edit box loses focus.

    • Please login to see this link.

    Please login to see this picture.

  • Thanks for the reply, I figured that might be the case, which explains GV a resets to 3, but why can't I get division to work properly? I've tried several other equations just out of curiosity with the Always --> set GV b to (GV a)/2 scenario and it always rounds.

    For example I tried setting GV a to 7 (during edit time) and creating the only event to be always --> set GV b to (GV a)/3 and it yields 2 instead of 2.33 while running. I'm worried I'm going to have to create large numeric work arounds to balance gameplay if I can't use decimals at all.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!