brent_hamel's Forum Posts

  • I guess I could just use that formula at the beginning of the movement to determine the distances/increments per ms and save it to a private variable for each object, and then use those variables as the distance to move each object per tick *TimeDelta... Ok, someone weigh in here, did I just solve my own stupid problem with an equally stupid solution? Or am I WAAAAAAY off, which given my math skill is probably the more likely answer xD

  • wait... did I just ask for ((b-a)/x)... are you serious...

    ok, before I try it, someone please tell me if what I just asked for is ((b-a/x)!! I hate sucking at math...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OR is there something that will work something like...

       mathcommand(a, b, x)//change a into b over x ms?//

  • Ok, I pretty much get Lerp (thanks to some awesome posts covering it) and TimeDelta is easy, but I'm missing something crucial for using them together...

    I basically want to move two objects each a set, but different, distance, over the course of say 1500ms. I've been trying to use lerp and TimeDelta to achieve this, and I can get them to work individually, but I can't seem to synch them up for some reason...

    is lerp the wrong algorithm to use?

    It should be something like...

    //object1.X <> ScrollX//

    set object1. X

        lerp(object1.x, destinationX, x*TimeDelta)

    set ScrollX

        lerp(ScrollX, destinationX, x*TimeDelta)

    How do I change x*TimeDelta for both objects so that no matter how different their X coords are, they'll still end in the same X at the same time?

    Please help?

  • Question?!? How do I ask construct to look at the object the player is currently overlapping, and then also check to see if the player is about to overlap another instance of the same object (in this case these are camera zones)...

  • that seems like the best solution, I've just never used the built in scrolling system very much, so I've got some experimenting and learning to do!

  • I don't understand any of this math... :(, but I wonder if it'd be possible to use an invisible sprite as an object to check for the triggering of the scrolling... Cause the scrolling I need only happens in specific places, not every screen...

  • that's awesome, thanks for the link, this should help me right out

  • I'd still prefer to find a way to do it manually, I'm just not sure how to go about it at this point...

  • sounds good, any ideas on how I might implement that? lol

  • would it maybe be easier to program a manual mega man-style screen transition as this is all I'm using MagiCam for...

  • yes I did, but this is a very complex project, and the crash bug occurs occasionally during a screen transition as well, but always on the layout change...

  • ok, so the only problem I'm having with MagiCam is that I'm getting a full on crash bug, EVERY time I tell the system to go to another layout... any ideas? What I really need is just to reload the current layout, but I'm not sure how to do that without using a second layout

  • well, see... I had started putting in a pause control variable that did just what you mentioned, but it began to get complicated with custom actions, like setting an enemies x speed to a set amount (so it bursts in a direction and then slows down over time based on the decel) but by pausing with the variable, I now have to create a pre-pause container for whatever that sprites x speed was, so that I can reset its x speed to that on unpause, and for 20 different enemies with different AI's that's REALLY daunting, so I was just curious for a potentially less headachy solution...

  • youtube.com/watch

    Here's the project this is all for, if anyone is interested, I know it's not the 100% correct place to post the link, but everything I'm asking is for this game lol, plus its a lot further along now than this video shows, I'm hoping to get the two above mentioned features working and then make another vid