How do I determine the time of collision

0 favourites
  • 5 posts
From the Asset Store
Time rewind like in "Braid". Choose objects that will be affected by time rewind
  • Hi all,

    New to Construct. Just began 'playing around'. Looks nice. Question. I want to know the time of collision (or the time an object reaches the border of a layout). I have two instances of an object with both it's own speed. I want to go to a next level when both instances collide with an object (or layout border) at the same time.

    Regards, Harry

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You might use tickCount or time...

    But it would be incredibly hard for both objects to collide at exactly the same time, I guess...

  • Perhaps it is not the time of collision you are looking for.

    2 overlap checks in 1 event.

    Event

    player a is overlapping Finish

    player b is overlapping Finish

    action

    go to layout

    for time tracking purposes, you could give each player its own variable: starttime, endtime

    and respectively set them at each event, after which you can use them in all sorts of calculations.

  • HarryDeBoer you could create timer like this

  • Hi all

    thanks for your answers. helped me to get going. I created an instance variable for this and on collision with walls I set the (rounded) time to that variable. I can see (write to text) the time on collision so that is working but I'm trying to figure out now how to compare the time variable for all instances -at gametime I don't know how many instances there are- at once.

    PS if the time for the instances is equal I restart the level with another instance added (so difficulty increases)

    Regards, Harry

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