エージェントの位置を調べる agent.getPosition
ひとことで言うと
エージェントの位置をワールド座標で返す。
ブロックとコード
エージェントの位置
ブロックの文言は公式の日本語版に合わせています(形は簡易表示です)。
agent.getPosition()agent.get_position()使用例
Display the Agent's world position with a chat command called "myagent".
JavaScript
player.onChat("myagent", function () {
player.say("My Agent's position is: " + agent.getPosition());
});Python
def on_on_chat():
player.say("My Agent's position is: " + str(agent.get_position()))
player.on_chat("myagent", on_on_chat)