GamerFlix / GamerFlix/foundryvtt-api-guide

Add boundary check functions to region guide

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.