[Bug] PRPL MapWidth and MapHeight, cursor cell readout.

GoodMorning · 362

GoodMorning

  • Community Guild
  • *****
    • Posts: 3383
  • (Pusillanimous)
on: November 06, 2016, 06:45:25 am
Script in development, map is minimum size (32x32). MapWidth and MapHeight each return 128. I'm trying to process unit positions cellwise for efficiency reasons. The cursor position goes up to (31,31). It looks like these now unexpectedly return a pixel width and height.



While I was looking at it, I noted that, the cursor-cell display reports accurately unless off the top edge of the map, clipping to the nearest on-map position. Off the top edge, X is always deemed to be 31 and Y varies with cursor position.
« Last Edit: November 06, 2016, 06:56:35 am by GoodMorning »

A narrative is a lightly-marked path to another reality.


knucracker

  • Administrator
  • *****
    • Posts: 11750
Reply #1 on: November 06, 2016, 10:26:19 am
Yeah... they seem to be coded to return the pixel size, which is 4 times the cell size.
I've just added MapCellWidth and MapCellHeight calls.  Of course those won't be there till the next build.  So the best you can do right now is mapwidth div(4).



GoodMorning

  • Community Guild
  • *****
    • Posts: 3383
  • (Pusillanimous)
Reply #2 on: November 06, 2016, 07:16:42 pm
Thanks.

A narrative is a lightly-marked path to another reality.