Alice Community fixing a barrier

 fixing a barrier
 TheAngryAlterEgo Guest   Status: Posts: n/a fixing a barrier - 10-03-2006, 07:40 PM I'm working on a game for a final project and I need to stop the player from moving through buildings and other items. I tested a working code that makes the player move away from an object when he gets too close in a new world and got it to work, but when I added the code to my game, the player moves either below the ground or above the objects when he gets near them. The only difference between the codes is that in the new world I had the player moving at a certain speed while in the game he moves forward 1 meter at a time while the legs move to make the walking realistic. This doesn't seem to make a difference either way however. This method is brought into another method where it is copied for every object on the screen and put into a Do Together. This is the walking command for the player. I tried replacing the current walk method with a Move at Speed method with no success. Is there any other way this problem can be fixed?
 Mr Nemo Guest   Status: Posts: n/a 10-03-2006, 08:49 PM Currently, I myself am still trying to perfect collisions. MY best suggestion for you is to run a search on the forum for collisions, and see if you can't find anything useful.
 TheAngryAlterEgo Guest   Status: Posts: n/a 10-03-2006, 10:00 PM I've already gone through the forum and haven't found anything that would work in this scenario unfortunatly.
 Mr Nemo Guest   Status: Posts: n/a 10-03-2006, 10:07 PM Then you might want to place an if else statement at the beginning of your method. Kinda like this: IF [(Arbalest) is within (distance) meters of (Object)] (Arbalest) turn (left) (.5) revolutions ELSE (Arbalest.run)
 Maybe the object moved with respect to the world?
 DrJim Guest   Status: Posts: n/a Maybe the object moved with respect to the world? - 10-04-2006, 03:01 PM I've never tried the "move away" coupled with "as seen by world" but the line of movement is going to be along a line from the center of the object to the center of the world - can't tell where that is, or if it changed, without looking at your worlds. Try changing the "as seen by" to the object actually moving and see if that helps.

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops General Discussion     Questions and Comments     The Lounge