Strange Math Problems

This forum is currently in read-only mode.
From the Asset Store
Strange Game Ambient Loops 3 - This is the third volume in the Strange Game series.
  • Hi,

    I really have a problem with a simple multiplication.

    global('m')*(global('n')+1)

    where m = 10

    and n = 0.85

    This should be 10*(0.85+1)=18.5

    BUT Construct means 17.65 is the right answer. I have done half of my game and now it hangs on this simple multiplication?

    Please help me.

    Greetings from the rainy Germany

    Michael

  • I am getting 18.5 here.

  • I have testet everything but i am getting 17.65 all the time.

  • I'm getting 18.5 also, can you share the .cap? Or maybe replicate the results in a fresh cap so we can see whats going on?

  • Hi,

    I really have a problem with a simple multiplication.

    global('m')*(global('n')+1)

    where m = 10

    and n = 0.85

    This should be 10*(0.85+1)=18.5

    BUT Construct means 17.65 is the right answer. I have done half of my game and now it hangs on this simple multiplication?

    Please help me.

    Greetings from the rainy Germany

    Michael

    17.65 would be the answer if m = 9. Perhaps everyone has already noticed that, but I thought I'd throw that out there just in case...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 17.65 would be the answer if m = 9. Perhaps everyone has already noticed that, but I thought I'd throw that out there just in case...

    Wouldn't the result then be more like 16.65 ?!!

    Anyway, for me the calculation comes up right in Construct as well. So a cap from you UnixRoot would help a lot to figure out what's actually going on.

    Greetings from the rainy Germany

    Yes, weather gone bad already.

  • > 17.65 would be the answer if m = 9. Perhaps everyone has already noticed that, but I thought I'd throw that out there just in case...

    >

    Wouldn't the result then be more like 16.65 ?!!

    Anyway, for me the calculation comes up right in Construct as well. So a cap from you UnixRoot would help a lot to figure out what's actually going on.

    > Greetings from the rainy Germany

    >

    Yes, weather gone bad already.

    oops, I guess what I should have said was 9*.85 + 10 = 17.65

  • http://dl.dropbox.com/u/12412965/exp.cap

    now here is the cap file. I really don't know what to do. Everything would be fine if the global('m') variable will be calculatedlike it should.

  • Event order does matter. So does the order of your actions. And in event 2 you're changing global 'n' before you calculate 'm', therefore the result appears to be off. Just put the actions in correct order and you're good to go.

  • Thank you very much, that solved my problem.

    And nice to see that there are some pixelartists on here. I love doing pixelart and retro graphics.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)