[SOLVED] Coded orders help please

I cannot summon artillery without boss star v so I can’t get the bonus. here is my code:

# Read the message on the sign to determine which units to summon and where to place them.
# Check the guide for instructions on interpreting the orders.

sign = hero.findByType("sign")[0]
message = sign.message

# Tip: parse the sign, then summon the units, then send each unit to the right position.

x = 0
y = 0
i = 0

while i <= len(message):
    typeInitial = message[i]
    x = int(message[i + 1] + message[i + 2])
    y = int(message[i + 3] + message[i + 4])
    if typeInitial == "a":
    elif typeInitial == "s":
    elif typeInitial == "p":
    elif typeInitial == "g":
    elif typeInitial == "P":
    elif typeInitial == "A":
        # a = hero.findByType("artillery")[0]
        # hero.command(a, "move", Vector(x, y))
    friend = hero.built.pop()
    hero.command(friend, "move", Vector(x, y))
    i += 5

Is there anything I’m doing wrong?

Try commanding the arteillery that is already there.

1 Like

i did try that, but that is not enough because i guess there may be 2 or more artillery

ok, i tried it again and added a break after commanding the artillery and IT WORKED!

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.