I know it's possible to make it so certain things happen when you collide something with an object on a certain side, for instance a door, if you run into it from one side it blocks you from that side and the other side does vise versa. I am retarded, so explain.
Assault Andy Administrator
I make other people create vaporware
Registered 29/07/2002
Points 5686
30th September, 2005 at 20:04:10 -
A common way of doing this is to use 'detectors' there are other methods but this is a pretty simple way. Basically, if you were making a Mario clone you could make a detector which is just an active object (rectangle or square usually) and in the code always set it's position to the bottom of Mario. Then you just test for collisions with the detector to detect if something collides with the bottom of mario (such as jumping on an enemy).
ha ha... uh... I'm thinking in terms of top down style, not platform... so the door kind of swings open... so yeah.
EDIT: A Good example of what I'm talking about is Jouni's The Darkest Night. I think the demo is still on this site if you check, that's basically what engine I'm going for.
Never thought of doing that, but yeah, I guess a door that does that, that would make things easier gameplay wise. So, can you tell me a simple code that I could mess with a bit?
EDIT: What I have right now is two objects. One is the top half of the door, the other is the bottom half. The both have several animations that run together, and those are Stopped(Closed) Opening (To the south), Open, Closing.