Hi I am stuck on this level so far this is my code
# Push the ball to knock over all the blue skeletons without hitting any red ones.
# The blue skeletons can be found as enemies.
TargetSkeletons = []
skeletons = hero.findByType("skeleton")
ball = hero.findNearest(hero.findByType("ball"))
friend1 = hero.findFriends()[0]
for skeleton in skeletons:
if skeleton.team == "ogres":
TargetSkeletons.append(skeleton)
else:
continue
def whereToGo(target,friend):
line = Vector.subtract(target.pos, ball.pos)
Position = Vector.add(line, 5)
hero.command(friend, "move", Position)
TargetSkeleton = TargetSkeletons[0]
whereToGo(TargetSkeleton, friend1)
this is the link for the level
I says that there is a problem with my command:move
right now I am just trying to knock down the first skeleton in my array