I'm making this game and i'm up to this bit where knives come down from above. You can dodge 'em.
How do i make it so that the knives can come down, you can move freely and if the knives touch you, you die.
AreObjectsColliding (int obj1, int obj2)
You'll also want to script something handle the 3rd dimension.
Because if the knife lands at y120 you don't want it to hit the character if he's above or below that point. So you'd have to script for when objects collide you check the characters Y pos and if he's walking at (or near) y120 the hit occures ... otherwise he's safe.
If you don't do this the knife would/could hit him even if he's lower down than it is because the objects will still (technically) be colliding.
Does that make sense?
])]V[