Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Fall off a building.
Old
robber120
Guest
 
Status:
Posts: n/a
Default Fall off a building. - 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.

Last edited by robber120; 12-10-2008 at 09:53 PM. Reason: Spelling Mistake. =)
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 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.


(')>

Last edited by x2495iiii; 12-21-2008 at 11:57 PM.
   
Reply With Quote
Old
The Big Angry Nerd
Guest
 
Status:
Posts: n/a
Default 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.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 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.


(')>
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.