View Full Version : Die? Solid?
Jeremytroid
10-16-2009, 10:42 AM
:confused:
I am making a little game and I'm wondering how I get it so that when I'm not above an object something happens. Also how to make it so that I can stand atop something that is a different height than my camera. The "character" is the camera if that's a factor.
Thanks
x2495iiii
10-16-2009, 01:42 PM
You'd need to make some if/else if statements which use the isAbove functions to check to see if the camera is over the object. Check the gravity post that I made about this subject:
http://www.alice.org/community/showthread.php?t=2937
http://www.alice.org/community/showthread.php?t=3042
Jeremytroid
10-16-2009, 04:06 PM
Yeah I tried. My game is the Mirror's Edge under "share your worlds" on the forum. I want it to be like your controlling a human being in first person, so with the gravity, it looks like your 1 inch of the ground and doesn't make sense.
You can mess with it and tell me what you find if you want. And that goes with any body who thinks they have an answer.
I have also tried the "if/else" statements with the "is above" but I'm not completely sure how to use them. So if you could tell me in more detail it would be appreciated.:D
x2495iiii
10-16-2009, 05:05 PM
The key in that case is to have a set height above the ground which acts as your stopping point. I modified your world slightly to show you what I meant.
The biggest problem you're going to have is making a set of markers and variables to gauge when the camera has stepped off of a building. I made a set for the first building (when you step too far left, right, or back of the building, you fall), but you'll have to do the rest.
Jeremytroid
10-16-2009, 07:32 PM
Cool thanks:)