Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wzapi call getScrollLimits() returns undefined for x1 and y1 #4157

Open
aco4 opened this issue Dec 22, 2024 · 1 comment
Open

wzapi call getScrollLimits() returns undefined for x1 and y1 #4157

aco4 opened this issue Dec 22, 2024 · 1 comment
Labels

Comments

@aco4
Copy link
Contributor

aco4 commented Dec 22, 2024

I'm making a mod that shrinks the borders of the map over time. To do this, I use wzapi call getScrollLimits(). This function should return an object containing x1, y1, x2, and y2.

x2 and y2 are populated with the correct values, but x1 and x2 are undefined.

test code:

const limits = getScrollLimits();
console(limits.x1); // undefined
console(limits.y1); // undefined
console(limits.x2); // 250
console(limits.y2); // 206

wz2100-20241222_031957-CleptoMaze-test4-T1

4.5.5

@aco4 aco4 added the Bug label Dec 22, 2024
@KJeff01
Copy link
Member

KJeff01 commented Dec 22, 2024

Heh, I remember this tripping me up the first time I used this. It uses .x and .y for the first coordinate set. Probably should update the getScrollLimits() documentation too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants