hello me again, i am not quite sure whats up with my code her nut it is not working the way i want it to. i might have written it wrong no promises it has been written right. The pet seems to say the password at the wrong volume, which in turn monkeys up the whole level. my apologies if i wasted you time but you help is greatly appreciated.
# Get the volume and the password. def onHear(event): # Get the volume and the password. words = event.message.split(" ") volume = words password = words # If the password should be loud: if volume == "Loud": # The pet says it in UPPER CASE. pet.say(words.toUpperCase()) # If the password should be quiet: if volume == "Quiet": # The pet says it in lower case. pet.say(words.toLowerCase()) pet.moveXY(pet.pos.x+ 24, pet.pos.y) def passDoor(): guard = hero.findNearest(hero.findFriends()) password = guard.password # If the password should be loud: if guard.isLoud: # Use the .toUpperCase() method on the password. hero.say(password.toUpperCase()) pass # If the password should be quiet: elif guard.isQuiet: # Use the .toLowerCase() method on the password. hero.say(password.toLowerCase) pass hero.moveXY(hero.pos.x+ 24, hero.pos.y) # The pet can hear guards. pet.on("hear", onHear) # The hero should use their properties. hero.moveXY(10, 14) passDoor() passDoor()