Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Guard Dog. Help plz


Guys, I dont know how to solve this task.

You can’t help the peasants across the river.

But, your pet can!

Teach your wolf to be a guard dog.

def alarm(event):
while True:
# Pets can find enemies, too.
enemy = pet.findNearestEnemy()
# If there is an enemy:
if enemy:
# Then have the pet say something:

pet.on(“spawn”, alarm);


The comment-instruction says # Then have the pet say something:

The pet should say something. pet.say



it doesn’t help. (((( I dont know how to solve.


Delete hero.say(“alarm”)


change hero.say(“message”) into pet.say(“message”).


This problem has been solved and left alone for six months. Try not to revive dead threads in the future, but thanks for extending a helping hand to the CodeCombat community. :slight_smile: