LittleStain's Recent Forum Activity

  • would adding timer behaviour work?

  • I would advice setting it to 0.5*dt to make it framerate independant.

  • More explanation about lerp can be found in this topic

    if you change the lerp value to a much lower one it will go slower.

  • You could also have a look at the MoveTo behaviour, a third party plugin.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • By George, I think I've got it!

    It was indeed the negative inside the square root that was ruining the party..

    Added abs() instead of the missing minus (which would have worked) and all seems to be working just fine.

  • Rereading the formula I missed a lot, haha..

    But it all seems to go wrong with the square root.

    Working on it!

    The formulas are a bit of pseudo-code to calculate the major axis and minor axis of an ellips from it's perimeter.

    z is the perimeter divided by pi and q is a percentage so a+b always add up to 100%

  • Yep.. somewhere, somehow, there must have been a translation-error..

    bah.. humbug..

  • RamPackWobble

    I guess that's worth a try, I was thinking of that but hoped it wouldn't be necessary, because it means adding a lot of local variables, but well..

  • I understand that, but:

    q is always larger than 50 and smaller than 100

    z is always larger than 0

  • Either I'm asking way too much of Construct2, or I'm just really bad at translating formulas.

    So what I'm trying to do is get these formulas into C2:

    <img src="https://dl.dropboxusercontent.com/u/48563442/Bodyshapes-3D-2D-formules.jpg" border="0" />

    But when I insert the values for q and z through variables the formula returns NaN (not a number), which is strange because the formula as I've put into C2 should consist only of numbers. Even when I manually change all z's and q's to numbers the outcome stays NaN.

    So I might just have put in the formulas the wrong way, or I'm pushing C2 beyond it's limits.

    Here are the formulas as I've entered them in C2:

    formula for a:

    abs((-6*z+((6*q*z)/(q-100)-sqrt((16*((q^2)*(z^2)-((100*q*z)^2)-((7500*z)^2))))))/2/(-6+((8*q)/(q-100))-(((6*q)^2)/((q-100)^2))))

    formula for b:

    abs(-(-6*z+((6*q*z)/(q-100)-sqrt((16*((q^2)*(z^2)-((100*q*z)^2)-((7500*z)^2))))))/2/(-6+((8*q)/(q-100))-(((6*q)^2)/((q-100)^2)))*q/(q-100))

    any advise would be appreciated.

  • Best argument ever!

    I don't like it, so it's crap.

    Discussion closed, you won!

  • If you put it in the right place it will work, but well..

    create two events:

    system compare variable flashlighton = 0

    • flashlight set visible

    system compare variable flashlighton = 1

    • flashlight set invisible

    keyboard on f pressed

    • system set flaslighton : 1-flashlighton
LittleStain's avatar

LittleStain

Member since 26 Apr, 2011

Twitter
LittleStain has 4 followers

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies