A few starting questions
I just started getting into M:EE to help a friend (teacher) who wants to include it in his lessons. So far I'm loving it. But I have a few minor questions:
1.) What's the difference between the agent and the builder? I know what the agent does, but what is the builder?
2.) I created a couple functions for the builder to build objects. That works fine. However, if I try to call this function from another function (e.g. in an if statement) I get the error message "types not compatible: (_: number, _: number, _: number) => void and () => any".
But if I replace the calling of the function (e.g. "BuildOne()") with the code from that function, it works.
Anyone an idea what I'm doing wrong?
3.) Is there a way to create a library of functions that can easily be shared between worlds? Or used from within a world by an include?
Any tips would be appreciated.
-
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 -
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 -
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 = 0strInput = "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 + 1player.on_chat("start", on_on_chat2)0
Please sign in to leave a comment.
Comments
3 comments