Created
April 30, 2021 21:01
-
-
Save CydGoblin/aedb668b6da947464ccead13b3ba3eec to your computer and use it in GitHub Desktop.
Foundry VTT Macros
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async function() { | |
if (canvas.tokens.controlled.length > 1) { | |
ui.notifications.error("Please select just one token"); | |
return; | |
} else if (canvas.tokens.controlled.length !== 0) { | |
let target = canvas.tokens.controlled[0]; | |
console.log(target.emitsLight) | |
if (target.emitsLight) { | |
target.update({ "dimLight": 0, "brightLight": 0}) | |
} else { | |
target.update({ "dimLight": 40, "brightLight": 20}) | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment