Moving to a items location. Python


#1

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.


#2

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)


#3

@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.