Ring-bearer- Level does not work

Hello, can you help me to find out, why it does not work. Please

die Position bestimmen möchtest.
def findSoldierOffset(soldiers, i):
    soldier = soldiers[i]
    angle = i * 360 / len(soldiers)
    return radialToCartesian(5, angle)

# Diese Funktion führt die Berechnung des Offset für die neue Position des Soldaten durch.
def radialToCartesian(radius, degrees):
    radians = Math.PI / 180 * degrees
    xOffset = radius * Math.cos(radians)
    yOffset = radius * Math.sin(radians)
    return {"x": xOffset, "y": yOffset}

peasant = hero.findByType("peasant")[0]
soldiers = hero.findByType("soldier")

# Benutze findByType, um einen Array mit deinen Sodaten zu erhalten.
while True:
    # Benutze eine for-Schliefe um über range(len(soldiers)) zu iterieren.
    for i in range (len(soldiers)):
        # Bestimme den Offset für einen Soldaten.
        soldier = soldiers[i]
        Offset = findSoldierOffset(soldiers, i)
        # Addiere offset.x und offset.y zu pos.x und pos.y des Bauern.
        x = peasant.pos.x + Offset.x, 
        y = peasant.pos.y + Offset.y
        pos ={"x": x , "y": y }
        # Befiehl den Soldaten, zur neuen Offset-Position zu gehen.
        hero.command(soldier, "move", pos)
    # Der Held sollte mit dem Bauern mithalten!
    hero.move({"x": hero.pos.x + 0.2, "y": hero.pos.y})

Does it say “Ran out of time”?
Could you also please post your hero and gear?

Thank you for trying to help!
No, actually it’s that duck:

1 Like

Here is my hero, however, I don’t think it does any matter…

please also post your equipment.

It appears that, after translation, your error states that the function being called cannot move your soldier, it only aims it.

Oh, I don’t see why. On my opinion with Boss star III it should work, but it does not :wink: