Q: Delayed Damage/Enemies don't cause damage for an amount of time after collision?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hello,

    I'm an after school instructor and I teach kids how to create video games using Clickteam Fusion 2.5.

    One of my students asked me an interesting question that I didn't immediately have the answer to.

    Is there a way to program a collision with an enemy, where after we've collided with the enemy our character doesn't take any damage from the enemy for a certain amount of time - for example 3 seconds. I have a bad guy set on bouncing ball movement and after the bad guy has collided with our character the student would like a "buffer period" where he doesn't take any damage from any bad guys.

    Any help you can give me on this question is very much appreciated!!! Thanks in advance

  • Havent seen example above, but you have to use either flags or an alt value. E.g. object collidies with player, set alt value a to 180. then make another event where if alt value a is over 0, subtract 1. In the damage event check that alt value a is equal or lower than 0.

    Please login to see this link.
    Please login to see this link.|Please login to see this link.|Please login to see this link.

  • I've created an example like that a couple of days ago, I've modified it a bit so the enemy now has a bouncing ball movement and the timer is 3 seconds before you can get damage again.

    Hi Know1, thank you, this has been a huge help and is working great for me! One quick question, how did you code the "Debug Stuff" section? I'm having trouble getting my code to match what you have : Always/Set alterable string to Str$(invisible timer("Active"))

    If you can help me understand how you achieved that coding and what exactly it does, i'd appreciate it alot! Everything else makes perfect sense to me and my game file is working great!

  • The Str$(invisible timer("Active")) expression is converting the alterable value named "invisible timer" of the object "Active" to text. It won't work if you don't have an active object named "Active" with an alterable value named "invisible timer".
    This event just lets you see the value of that alterable value on screen with the string object.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!