Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Jimmy on Thu 08/01/2004 00:22:34

Title: Making this object thing.
Post by: Jimmy on Thu 08/01/2004 00:22:34
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.
Title: Re:Making this object thing.
Post by: Darth Mandarb on Thu 08/01/2004 00:32:56
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[