Moving to a items location. Python

So I have noticed that sometimes when I am attempting to move to an items position it does not work properly while other times it does depending on the way its set up in the code.

Ex: hero.moveXY(item.pos.x, item.pos.y)

It seems that most times I have to make a variable for pos., x, and y. Is there any reason why this is that someone know. I mean its not that I cant work around it but it is nicer in my opinion to do it like in the example.

the example has a spelling error. And if you want to write a shorter line to move in a item’s position, use hero.move(item.pos)

1 Like

@Seojin_Roy_Lee Thanks for telling me about the spelling error. Also on the example you gave I do that now that I have access to that command but that was before I had the command. I was just curious if there was a reason.

I tride that and it didnt work

Hi, welcome to the CodeCombat discourse.
Maybe you don’t have boots with the move() ability? Check on you boots and see.

Thank you this helped so much as i forgot how to move to item pos. thankyou.

Please don’t necropost @Antoni_Druzynski. :slight_smile: