PDA

View Full Version : zombie mad professor


Cwizard
10-03-2010, 01:50 PM
Scenario: A quiet field somewhere contains the Mad Professor, a Zombie and a fence with a gate in it (Don’t ask me how a Mad Professor and the Zombie got to be in the middle of a field, but they did). A file, assignment1.a2w containing these objects is available on the assignments area of black board. Your program must be based on this file.
The Mad Professor responds to the left arrow (turning left .1 revolutions), the right arrow (turning right .1 revolutions) and the up arrow (moving forward 1 meter). The Zombie will chase the Mad Professor each time he moves forward. But the Zombie is faster than the Professor, moving 1.1 meters to the professors 1 meter each move.
The Professor does not wish to get caught by the Zombie If the Zombie gets to within 1.5 meters of the mad Professor the professor vanishes. And the game will be over. If the Professor can get to within 2 meters in front of the gates before the Zombie catches him the gates will open and the Professor will be safe. The Zombie is petrified of “the world outside the gates”. Once the gates open the game ends and the Zombie disappears.
To stop the Professor disappearing off screen the camera should be pointed at the professor after each move.


This is the assignment i got and so far i've done ok ( i think ) but i cant seem to get it 100% right.
If anyone can give me any advice or hints or tips i'd be grateful.
I uploaded it as an attachment.

Cheers!

Edward

debussybunny563
10-03-2010, 05:32 PM
Fixed it up.

Here you go, and feel free to ask questions.


I normally give comments about the code (and sometimes in the code), but I'm feeling lazy. :o

Then again, this is my 400th post. BOOYAH!!!

EDIT: Attachment removed 'cause I can't do other people's work (as noted by jediaction).

jediaction
10-03-2010, 07:05 PM
Wow! Wait, on here we dont do other peoples home work. Dont just fix it and give it back. Thats cheating! Take it off before he saves it. Sorry but its just a heads up


Cheers!

Edward

Cheers? Do you happen to know an Efron?

debussybunny563
10-03-2010, 07:11 PM
Uh, okay.? :confused:

It's gone now.

Cwizard
10-24-2010, 01:57 AM
Wow! Wait, on here we dont do other peoples home work. Dont just fix it and give it back. Thats cheating! Take it off before he saves it. Sorry but its just a heads up



Cheers? Do you happen to know an Efron?

What are you on about? lol,


Thanks debussybunny563, i appreciate your help. Even tho i didn't get to save it.

jediaction
10-24-2010, 12:26 PM
What are you on about? lol,


Thanks debussybunny563, i appreciate your help. Even tho i didn't get to save it.

Sorry, just a guy who does the same signature....:)