Files
foundryvtt-wh4-lang-fr-fr/scripts/jsgLEVYvMieyYT6L.js

18 lines
716 B
JavaScript

let tokenImg = ""; // Put path to token image here, inbetween the quotation marks
if (tokenImg)
{
if (this.effet.getFlag("wfrp4e", "transformed"))
{
await this.effect.setFlag("wfrp4e", "transformed", false);
this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: this.actor.prototypeToken.texture.src}}));
}
else
{
await this.effect.setFlag("wfrp4e", "transformed", true);
this.actor.getActiveTokens().forEach(t => t.document.update({texture : {src: tokenImg}}));
}
}
else
{
this.script.notification("Aucun chemin d'image de token configuré. Le chemin de l'image doit être défini dans la première ligne de ce script.", "error");
}