Skip to main content

A few starting questions

Comments

3 comments

  • Debbie Alexander
    Moderator Beacon of Knowledge Super Star

    Hey, Eugen Weber - It sounds like you have hit the ground running! How exciting! The builder/agent question is one I had at first as well!

    The agent has to be teleported to you, appears in the world, takes up space and moves (or can be prevented from moving because of obstacles like blocks.

    The builder is a cursor, which is guided along as a placeholder, similar to an insertion point.

    You can share your code between worlds. Use the share link to keep copies of your code, and to make it available. However, only one coding project runs at a time.

    Data types are definitely enforced. I'd need to see the calls - maybe a screenshot?

     

    Best wishes. I am looking forward to hearing more!

     

    1
  • Eugen Weber

    Thanks for the reply.

    Here's a screenshot of my code. Please don't judge me too harshly on it, it was just to try out how everything works together :)

    As you can see I have first the function on building a letter (I know there is the "print" command I could use, but I wanted to create a different font). And the second part (start) would be where you can enter a string and it would build letter by letter.

    I tried different varions (like calling it with BuildOne() ), but it just doesn't work. Probably something small I'm not thinking off....

    0
  • Debbie Alexander
    Moderator Beacon of Knowledge Super Star

    Okay, I think this works. (you can add in the rest of the building)

    def on_on_chat():
    agent.set_slot(1)
    agent.set_item(IRON_BLOCK, 8, 1)
    for index inrange(6):
    agent.place(FORWARD)
    agent.move(UP, 1)
    player.on_chat("go", on_on_chat)

    def on_on_chat2():
    n = 0
    strInput = "12*3"
    for index2 in strInput:
    player.say(index2)
    if"1" == strInput[n]:
    player.say("Found 1")
    player.run_chat_command("go")
    #loops.pause(5000)
    n = n + 1
    player.on_chat("start", on_on_chat2)
    0

Please sign in to leave a comment.