In Dungeon Arena targetPos is listed but it is not available


#1

At least when using IronJaw in Dungeon Arena targetPos is listed but it is not available

Perhaps better to list target.pos ?


#2

Is this the same problem as Issue #742, where the spell popover documentation suggests there’s a method available that is not available?


#3

I’m not sure on the underlying logic,
but maybe.

is targetPos a variable used internally? or is it included in the list of methods manually and mistakenly?

As I said - target.pos is correct


#4

Where is it listed? targetPos is an actual property of each Thang, but is only set when you are moving to a position, not when targeting another Thang.


#5

it is in the list of actions in the bottom right hand corner, either on the first tab, or the ‘more’ tab.


#6

Oh right, that. That’s in there because if you are moving to a location, then targetPos is set and target is null. If you are targeting another unit, then target is set and targetPos is null. We split it up into two properties so the types (unit vs. {x, y} position) would be more consistent.


#7

but it cant be affected/accessed through the players code.


#8

You can’t set it directly (because targetPos gets set via methods that set a target position, like move()), and if you access it while it’s not set, it will be null. Is that what you mean?


#9

yes,

and so it shouldnt be in the list visible to the player