View Full Version : Fall off a building.
robber120
12-10-2008, 09:31 PM
I have a character on top of a building, the point is that he can jump from building top to bulding top.
I am not sure how to make it so if he goes off the edge he falls to the ground.
I have tried multiple things but am still unsure.
I am using buildingcluster4.
x2495iiii
12-18-2008, 03:54 PM
Try putting a placeholder (a shape that's invisible, set "isShowing" to false) on the top of the building, right in the center, Then, use an "if character's distance to the left of place holder is more than (the placeholder's distance from the left edge), then "characterFallOffRoof". Repeat for all 4 edges.
The Big Angry Nerd
12-19-2008, 12:25 PM
I don't know if this will work. But you could also find the surface area for each building, building1-3's height * buildings1-3's width and have him fall down if he is beyond its threshold.
x2495iiii
12-22-2008, 12:00 AM
Yes, but you'd still need the placeholder to compare it to. Also, you could leave most of the math to the computer if you simply compared distance to dimensions.