Element Interaction

I have been having trouble with probably a simple project. I am making a simple game and I have a dot that moves using a wasd type controller. I was wondering how I make the player do something if it touches a different element, for example killblock. I have tried to solve this, but I am open to any suggestions. Thank you!

3 Likes

Hello @Larry_2toes. Can I Have The Code Please As I Want To Take A Look At The Code.

1 Like

Sure! Here are some screenshots of all my code; I was thinking maybe testing for if their y and x positions matched? (P.s. I will have to reply to your comment three times because it says I can only post one pic a message)

Which One Is The Zombie, The Circle Or The Rectangle. Maybe Try To Add Another svg.append(' ') and add remove() and .duration( ). That is The Idea I Got In My Head.

@Leli_Leli the only problem with that is that I want it to be interactive, because it is not a set time until they reach the element.

Sorry, I Just Want To Help. I Like To Help.