LittleStain's Forum Posts

  • would adding timer behaviour work?

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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
  • instead of the second event

    put the flashlighton = 0 as a subevent and

    use the system else condition.

  • Why not give the orcs the built in line of sight behaviour and move the orc with a movement behaviour?

    for each orc

    orc has line of sight to player

    system compare two values: distance(orc.x, orc.y, player.x, player.y)<200

    -orc set orc.seesplayer : orc.seesplayer+1

    -orc set bullet angle : angle(orc.x, orc.y, player.x, player.y)

    orc has not line of sight to player

    -orc set orc.seesplayer : orc.seesplayer-1

    for each orc - orc set bullet speed: orc.seesplayer/10

    set the bullet behaviour to bounce of solid and there you go!

  • Have you tried switching the physics engine?

    There are 3 possibilities, box2dweb, box2d asdm.js, cocoonjs native.

    You seem to be talking about Ludei, so I guess you should use cocoonjs native.