PDA

View Full Version : New to alice.. Anyone have a world like this?


sarah527
11-18-2011, 01:38 AM
I need help with creating a world like this. Can anyone help???? It's a project from the Alice In Action With Java book, programming project 3.1. Variables need to be used so you don't have to do trial and error with the distances between objects and such. I do not understand the variables aspect of this...

"Build a scene containing two people who walk toward each other from opposite sides of the screen. When they meet, they should turn and walk off together toward a building, and enter the building when they get there."

Thanks :)

DensetsuNoKaboom
11-18-2011, 05:22 PM
I don't think it looks very hard...

dakota95
11-22-2011, 03:41 PM
just make them walk towards eachother to start. Then one of them turn and both walk again

DensetsuNoKaboom
11-23-2011, 02:47 PM
Apparently it requires variables to be used, which to me sounds kinda pointless in this instance.

davidghemer
11-29-2011, 04:14 AM
Use the distance to function to measure the distance between the two people and store this in a variable, dist.

Then move the two people dist/2 towards each other (you will need to adjust a little to leave a small amount of distance between the two people but that should be easy to do).

mdemonion
12-12-2011, 08:21 AM
Wow i really like your idea of creating a world..It is so nice and it shows creativity..What I like most is your concept or we can say thinking of a scene containing two people who walk toward each other from opposite sides of the screen...