GamerFlix / GamerFlix/foundryvtt-api-guide
Add boundary check functions to region guide
Open
- Dominant language
- No language data
- Stars
- 21
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
```js
const door = canvas.walls.doors.find(e => region.object.testPoint({x: e.document.c[0], y: e.document.c[1]}) || region.object.testPoint({x: e.document.c[2], y: e.document.c[3]})); // check if the amount of ) is correct here :D
```
Region document, which should contain a Set of the tokens within it. so a simple check for
```js
const amountTokens = region.tokens.size;
// do something with amountTokens
```
The triggered macro or script has the Region document defined as `region` in it arguments so you can just use that.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.