How do I use delta time as condition for checking collisions

0 favourites
  • 4 posts
From the Asset Store
Time rewind like in "Braid". Choose objects that will be affected by time rewind
  • I have a platformer side scroller game that has damage system (player attacking enemies and vice versa), I use "on collision with another object" as condition for attacking.

    When my player is hit by enemy, I disable all controls (custom movement, attacks) while showing damage animation.

    I have noticed that it works fine, BUT when I don't release my press on my movement keys WHILE player is being hit, the availability of the controls PERSISTS during damage animation of player.

    So I have come to the conclusion that I need to check the collision more frequently than I have now.

    How do I use delta time as additional condition to add to my already existing events?

  • I'm not sure how you've reached this conclusion, or why you think it has something to with delta time -- it just sounds like a bug in your events. If you post a capx -- at the very least show a picture of your events -- it would be a lot easier to help you solve the problem.

  • well the last post here explained it to me

    and this is another situation where I need delta time I think

    Bullets have instance var called Bullet_Enabled (text-type), initial value is "No"

    When bullets hit player and player is NOT using guard animation

    -> disable bullet behavior

    ->Set Bullet_Enabled to Yes

    ->Wait 0.5 secs

    ->Destroy bullet

    When bullets hit player and player is using guard animation

    -> bounce bullet off player

    ->Wait 1.5 secs

    ->Destroy bullet

    The significance of the "Yes" value of Bullet is in the damage system of the player, meaning Bullet_Enabled having a value that is not "Yes" will not hurt the enemy (damage player's life, make player use damage animation)

    Not all bullets are bounced, and not all bullets that are supposed to damage player does. Both situations are iffy.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ... dependence

    This article shows how to use dt as expression, but I can't figure out which condition to use to be able to include dt in it (condition)

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