Created
January 30, 2022 17:43
-
-
Save palikhov/01a7afcde74a077572e3c631ef83acfc to your computer and use it in GitHub Desktop.
Foundry VTT Token Light Torch Macro
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
if (token.data.light.dim === 0) { | |
await token.document.update({ | |
light: { | |
alpha: 0.4, | |
angle: 0, | |
bright: 20, | |
coloration: 1, | |
dim: 40, | |
gradual: true, | |
luminosity: 0.5, | |
saturation: 0, | |
contrast: 0.25, | |
shadows: 0, | |
animation: { | |
speed: 1, | |
intensity: 2, | |
reverse: false, | |
type: "torch", | |
}, | |
darkness: { | |
min: 0, | |
max: 1, | |
}, | |
color: "#ff9b00", | |
}, | |
}); | |
} else { | |
await token.document.update({ | |
light: { | |
alpha: 0.5, | |
angle: 0, | |
bright: 0, | |
color: "#000000", | |
coloration: 1, | |
dim: 0, | |
gradual: true, | |
luminosity: 0.5, | |
saturation: 0, | |
contrast: 0, | |
shadows: 0, | |
animation: { | |
speed: 5, | |
intensity: 5, | |
reverse: false, | |
}, | |
darkness: { | |
min: 0, | |
max: 1, | |
}, | |
}, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment