< Vision
No edit summary |
No edit summary |
||
| Line 16: | Line 16: | ||
}); | }); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Note that for weapons, the Active Effect needs to be on the weapon itself, not the accessory. | |||
Revision as of 15:46, 20 March 2024
To keep optics mounted on weapons useful, use this code to take the weapon's range into account:
await game.macros.getName("Low-Light Vision").execute({
token: token,
rating: item.system.range.ranges.extreme / 3 - 2,
cone: 15
});
await game.macros.getName("Thermographic Vision").execute({
token: token,
rating: item.system.range.ranges.extreme / 3 - 1,
cone: 15
});
Note that for weapons, the Active Effect needs to be on the weapon itself, not the accessory.
