Canā€™t Detect When Player and Enemy touch | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Canā€™t Detect When Player and Enemy touch

Iā€™ve put a function to detect when two elements touch each other but it doesnā€™t work when I use the setInterval function because I canā€™t name the function itself but I need to put the function name so that it can know what piece of code to use to give me an output. https://code.sololearn.com/WLnr5wgm6sWe/?ref=app

2nd Oct 2022, 1:33 AM
Andy Duvaey
Andy Duvaey - avatar
2 Respostas
+ 2
Your timer is not running the detection, I have form the detection function,and set the time to tun it instead. https://code.sololearn.com/WqAngZaGQoAr/?ref=app
2nd Oct 2022, 1:58 AM
CalviÕ²
CalviÕ² - avatar
+ 1
Thank you so much! šŸ‘šŸ’ÆšŸ’Æ This was exactly what I needed for it to work! Again, thank you!
2nd Oct 2022, 9:23 PM
Andy Duvaey
Andy Duvaey - avatar