How do I fix this formula so it won't turn out as NaN?

0 favourites
  • Sorry, try this one:

    (Overheat / 6) * (max(WeaponLevel,100) - 100) ^(1.5 * ((max(WeaponLevel,100) - 100) / 10) /2)

    That seems to have done the trick!

    Thank you all very much!

    I think I also found the source of the glitch.

    So I have this object that stores the WeaponLevel on all weapons. Now the issue is that I had them on all three layouts, which resulted in three of them being active on a layout at once (because they were global and also had the behavior "Persist". Going into the debug mode, I saw that one of them had the default variables (every level on 0) which was probably the issue.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, that's what we were telling you from the beginning. That's why I suggest checking variable values using Browser Log, you would've seen the issue straight away.

  • Yeah, that's what we were telling you from the beginning. That's why I suggest checking variable values using Browser Log, you would've seen the issue straight away.

    Yeah, that was on me. Didn't think there would be multiple ones at the same time.

    Still, thank you for your help

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